title: Assigning dbo.owner permissions to a SPN in terraform
body: <p>I am trying to app and SPN (that the pipeline runs on) as dbo.owner on a sql database that terraform provisions.</p>
  <p>I have created the MSI (Managed Service Identity) on the SQL Server by :</p>
  <pre><code> identity {
      type = &quot;SystemAssigned&quot;
    }
  </code></pre>
  <p>In the SQL block.</p>
  <p>So I need terraform to use this MSI to assign a very simple t-sql statement like :</p>
  <pre><code>ALTER ROLE [dbo.owner] etc
  </code></pre>
  <p>I have also found this 3rd party terraform resource <a href="https://registry.terraform.io/providers/betr-io/mssql/latest/docs/resources/user" rel="nofollow noreferrer">here</a></p>
  <p>I am just wandering if anyone has put all this together..
  Thx</p>