Skip to content

Commit

Permalink
Fix role assignment deployment names for multi-location matrix deploy…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
plzm committed Apr 20, 2024
1 parent 78bb9bc commit 9a82f68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/AzureSecurity.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Deploy-RoleAssignment()

Write-Debug -Debug:$true -Message "Deploy Role Assignment: RoleDefinitionId=$RoleDefinitionId, PrincipalId=$PrincipalId, PrincipalType=$PrincipalType, ResourceGroupName=$ResourceGroupName, ResourceType=$ResourceType, ResourceName=$ResourceName"

$deploymentName = "rbac-" + $RoleDefinitionId
$deploymentName = "$Location-$ResourceName-$RoleDefinitionId"

$output = az deployment sub create --verbose `
-n "$deploymentName" `
Expand Down Expand Up @@ -76,7 +76,7 @@ function Deploy-RoleAssignmentRg()

Write-Debug -Debug:$true -Message "Deploy RG Role Assignment: RoleDefinitionId=$RoleDefinitionId, PrincipalId=$PrincipalId, PrincipalType=$PrincipalType, ResourceGroupName=$ResourceGroupName"

$deploymentName = "rbac-rg-" + $RoleDefinitionId
$deploymentName = "$Location-$ResourceGroupName-$RoleDefinitionId"

$output = az deployment sub create --verbose `
-n "$deploymentName" `
Expand Down Expand Up @@ -116,7 +116,7 @@ function Deploy-RoleAssignmentSub()

Write-Debug -Debug:$true -Message "Deploy Sub Role Assignment: RoleDefinitionId=$RoleDefinitionId, PrincipalId=$PrincipalId, PrincipalType=$PrincipalType"

$deploymentName = "rbac-sub-" + $RoleDefinitionId
$deploymentName = "$Location-$RoleDefinitionId"

$output = az deployment sub create --verbose `
-n "$deploymentName" `
Expand Down

0 comments on commit 9a82f68

Please sign in to comment.