Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create roles with Azure managed identities in Azure PostgreSQL Flexible Servers #414

Closed
wants to merge 3 commits into from

Conversation

Teabeats
Copy link

@Teabeats Teabeats commented Mar 4, 2024

This is an Azure (PostgreSQL Flexible Server) specific addition to the role resource which allows to create roles and "assign" to them an Azure managed identity.

More details can be found here: https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-manage-azure-ad-users

Note: there are some additional features available like setting an admin or MFA flag which can be added easily if there is demand, but are left out to keep this PR and the list of options clean for now.

@0xMH
Copy link

0xMH commented Mar 7, 2024

Is this related to #385?

@Teabeats
Copy link
Author

Teabeats commented Mar 8, 2024

Is this related to #385?

No that issues is only related to using a service principle with the provider, this functionality allows to create new identity based logins/roles similar to azurerm_postgresql_flexible_server_active_directory_administrator, but for non-admins (eg workloads). It does required the provider to be used with an actual "flexible server active directory" administrator.

@Teabeats
Copy link
Author

@cyrilgdn what is needed to pass the expected tests?

@scrocquesel
Copy link

I guess this is already covered in a more generic way with #365

@Teabeats
Copy link
Author

I guess this is already covered in a more generic way with #365

Agree and thanks for mentioning, that is a much better solution. My PR started out using the first option in de ms docs using select * from pgaadauth_create_principal_with_oid and later changed to directly setting the security label. #365 has been open since oktober, wonder why?

Closing this PR in favour of #365 !

@Teabeats Teabeats closed this Apr 15, 2024
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