Skip to content

Commit b17e634

Browse files
author
Evilazaro Alves
committed
Bug fix role assignment
1 parent ed62040 commit b17e634

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/identity/devCenterRoleAssignmentRG.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource roleDefinition 'Microsoft.Authorization/roleDefinitions@2022-04-01' exi
2525

2626
@description('Role assignment resource')
2727
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (scope == 'ResourceGroup') {
28-
name: guid(resourceGroup().id, principalId, id)
28+
name: guid(subscription().id, resourceGroup().id, principalId, id)
2929
scope: resourceGroup()
3030
properties: {
3131
roleDefinitionId: roleDefinition.id

src/identity/orgRoleAssignment.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ param principalType string = 'Group'
1717
@description('Role assignments for the security group')
1818
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [
1919
for role in roles: {
20-
name: guid(subscription().id, principalId, role.id)
20+
name: guid(subscription().id, resourceGroup().id,principalId, role.id)
2121
scope: resourceGroup()
2222
properties: {
2323
principalId: principalId

src/identity/projectIdentityRoleAssignment.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource project 'Microsoft.DevCenter/projects@2025-04-01-preview' existing = {
2525
@description('Role assignments for the project')
2626
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [
2727
for role in roles: if (role.scope == 'Project') {
28-
name: guid(project.id, principalId, role.id)
28+
name: guid(subscription().id, resourceGroup().id, project.id, principalId, role.id)
2929
scope: project
3030
properties: {
3131
principalId: principalId

src/identity/projectIdentityRoleAssignmentRG.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource project 'Microsoft.DevCenter/projects@2025-04-01-preview' existing = {
2525
@description('Role assignments for the project')
2626
resource roleAssignmentRG 'Microsoft.Authorization/roleAssignments@2022-04-01' = [
2727
for role in roles: if (role.scope == 'ResourceGroup') {
28-
name: guid(project.id, principalId, role.id)
28+
name: guid(subscription().id, resourceGroup().id, project.id, principalId, role.id)
2929
scope: resourceGroup()
3030
properties: {
3131
principalId: principalId

0 commit comments

Comments
 (0)