betr-io / terraform-provider-mssql

Terraform provider for Microsoft SQL Server
https://registry.terraform.io/providers/betr-io/mssql/latest
MIT License
35 stars 29 forks source link

Support for AAD groups in Azure SQL database #78

Open radsto opened 5 months ago

radsto commented 5 months ago

Hi,

Thanks a lot for developing this provider !

I propose a small improvement to be able to create external users with arbitrary types. This is useful for creating groups (type X) instead of external users (type E)

Ref: https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-database-principals-transact-sql?view=sql-server-ver16

It seems to work perfectly for my use case.

Regards,

Radu

spencerr commented 4 months ago

@magne Any change of this getting some eyes? I'm also interested in this.

radsto commented 3 months ago

@magne

The source is here : https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?view=azuresql&tabs=azure-powershell

image

I didn't plan to run tests sorry for that I have implemented the fork on our side a while ago and it works perfectly for our use case. Not having much time to get back into this. I hope you can someday support this feature and this PR was a quick suggestion on what I did.

It probably works just for Azure SQL databases I have no possibility to check on-prem deployments.