role assignment on postgres for a managed identity (azure vm) #7620
-
Hello, I am trying to assign inbuilt role (Reader) for a system assigned identity (azure VM) on a Azure postgres database. resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-10-01-preview' = { the principal ID in the above is retrieved in the main template as: Note: In the postgres deployment, we have ensured that : identity: { is set. Result: When deploying the bicep module, we face this error: "code": "BadRequestFormat", Any hints on how to assign roles using bicep on a postgres for a managed VM? Regards, Saba |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
What format are you using for the roleDefinitionId? E.g. resourceId('Microsoft.Authorization/roleDefinitions', parameters('roleDefinitionId')) |
Beta Was this translation helpful? Give feedback.
-
Will try and get back .. thanks for the hint |
Beta Was this translation helpful? Give feedback.
-
It works.. my mistake.. the full reference ID did it. Thanks a lot. |
Beta Was this translation helpful? Give feedback.
What format are you using for the roleDefinitionId?
E.g.