Any Azure types here? I could use a hand with an issue I'm having on a template. The template's purpose is to create a resource group using a bunch of parameters to give it a name, then to assign the built-in Contributor RBAC role to a security group specified as another parameter. When I deploy the template, either through the Azure portal or via New-AzSubscriptionDeployment, I get the following error: Could not find member 'roleDefinitionId' on object of type 'ResourceGroupPropertiesDefinition'. Path 'properties.roleDefinitionId' Anyone know what I'm doing incorrectly? The section of the offending template is below, with redactions for any possible company stuff. code:
|
|
# ? Dec 14, 2020 15:41 |
|
|
# ? May 4, 2024 03:13 |
|
I don't think you should have anything in properties. The way you are expected to set role assignments is with a separate role assignment arm resource targeted to the resource group's id. see: https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template for your own sanity you may want to consider managing role assignments in something that isn't arm templates like terraform or ansible or your IAC tool of choice.
|
# ? Apr 24, 2021 16:49 |