Open PeterBrun opened 21 hours ago
[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!
[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.
@PeterBrun, thanks for submitting this issue for the avm/res/db-for-postgre-sql/flexible-server
module!
[!IMPORTANT] A member of the @Azure/avm-res-dbforpostgresql-flexibleserver-module-owners-bicep or @Azure/avm-res-dbforpostgresql-flexibleserver-module-contributors-bicep team will review it soon!
Check for previous/existing GitHub issues
Issue Type?
Bug
Module Name
avm/res/db-for-postgre-sql/flexible-server
(Optional) Module Version
No response
Description
There is a bug in the flexible-server AVM module (br/public:avm/res/db-for-postgre-sql/flexible-server) where databases are created before administrators. This causes the databases to be owned by azuresu instead of the specified admin group. If a database is added after the initial creation of the server, the owner is set correctly to the admin group.
Steps to Reproduce
// Required parameters param name = 'avmflexexampleadmin001' param skuName = 'Standard_B2s' param tier = 'Burstable' // Non-required parameters param highAvailability = 'Disabled' param location = 'swedencentral'
param administrators = [ { objectId: '[ENTER GROUP OBJECT ID]' principalName: 'admins' principalType: 'Group' } ] param databases = [ { name: 'db1' } ]