Skip to content

Commit

Permalink
Include managementGroup().name as part of role assignment GUID to avo…
Browse files Browse the repository at this point in the history
…id possible duplicates. (#143)

* Include mgmt group name as part of role assignment GUID.

* Updated README to include revised default value.

Co-authored-by: Ryan Graham <[email protected]>
Co-authored-by: Jack Tracey <[email protected]>
  • Loading branch information
3 people authored Feb 15, 2022
1 parent 011e7e8 commit 5268a43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion infra-as-code/bicep/modules/roleAssignments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Connect-AzureAD

| Parameter | Type | Description | Requirement | Example |
| ------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------- |
| parRoleAssignmentNameGuid | string | A GUID representing the role assignment name. Default: guid(parRoleDefinitionId, parAssigneeObjectId) | Unique GUID | `f3b171da-2023-4508-b467-042a53f4cd5d` |
| parRoleAssignmentNameGuid | string | A GUID representing the role assignment name. Default: guid(managmentGroup().name, parRoleDefinitionId, parAssigneeObjectId) | Unique GUID | `f3b171da-2023-4508-b467-042a53f4cd5d` |
| parRoleDefinitionId | string | Role Definition ID(i.e. GUID, Reader Role Definition ID: acdd72a7-3385-48ef-bd42-f606fba81ae7) | Must exist | `acdd72a7-3385-48ef-bd42-f606fba81ae7` |
| parAssigneePrincipalType | string | Principal type of the assignee. Allowed values are `Group` (Security Group) or `ServicePrincipal` (Service Principal or System/User Assigned Managed Identity) | One of [Group, ServicePrincipal] | `ServicePrincipal` |
| parAssigneeObjectId | string | Object ID of groups, service principals or managed identities. For managed identities use the principal ID. For service principals, use the object id and not the app ID | Must exist | `a86fe549-7f87-4873-8b0e-82f0081a0034` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ VERSION: 1.0.0
*/
targetScope = 'managementGroup'

@description('A GUID representing the role assignment name. Default: guid(parRoleDefinitionId, parAssigneeObjectId)')
param parRoleAssignmentNameGuid string = guid(parRoleDefinitionId, parAssigneeObjectId)
@description('A GUID representing the role assignment name. Default: guid(managementGroup().name, parRoleDefinitionId, parAssigneeObjectId)')
param parRoleAssignmentNameGuid string = guid(managementGroup().name, parRoleDefinitionId, parAssigneeObjectId)

@description('Role Definition Id (i.e. GUID, Reader Role Definition ID: acdd72a7-3385-48ef-bd42-f606fba81ae7)')
param parRoleDefinitionId string
Expand Down

0 comments on commit 5268a43

Please sign in to comment.