Skip to content

Conversation

@radsto
Copy link

@radsto radsto commented Feb 2, 2024

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
Copy link

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

Copy link
Contributor

@magne magne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try to run the acceptance tests? Most, if not all, tests regarding users fail with a non-empty plan where the user_type would have to change from S to E.

I can't approve the PR until the acceptance tests are OK. Also, you should add tests where you set the type.

BTW, can you point me to the documentation for CREATE USER ... WITH TYPE=...? I can't seem to find it.

@radsto
Copy link
Author

radsto commented Mar 27, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants