https://pulumi.com logo
Title
w

wooden-receptionist-75654

11/01/2021, 1:48 PM
Hi Guys, In case I’d like to use buil-in role for
authorization.RoleAssignment
. Is there any way to get
roleDefinitionId
by the name? For example I’d like to use DNS Zone Contributor. How can I get it can roleDefinitionId for my subscription?
p

powerful-football-81694

11/01/2021, 4:05 PM
Hi Sergii, this is being tracked here: https://github.com/pulumi/pulumi-azure-native/issues/610
For now we have to know each role’s ID
I built a little helper class for this, here it is in case you find it helpful
I only added the ones I needed, but you can add the ones you want from here: https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles
w

wooden-receptionist-75654

11/01/2021, 4:23 PM
Thank you @powerful-football-81694!