Skip to content

Commit

Permalink
Added suffix to deployment name (Azure#824)
Browse files Browse the repository at this point in the history
* Added suffix to deployment name

* GitHub Action: Build Bicep to JSON

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
jamasten and github-actions authored Jan 24, 2024
1 parent 63a6352 commit e79b0c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bicep/mlz.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ module hubDefender './modules/defender.bicep' = if (deployDefender) {
}

module spokeDefender './modules/defender.bicep' = [for spoke in spokes: if ((deployDefender) && (spoke.subscriptionId != hubSubscriptionId)) {
name: 'set-${spoke.name}-sub-defender'
name: 'set-${spoke.name}-sub-defender-${deploymentNameSuffix}'
scope: subscription(spoke.subscriptionId)
params: {
logAnalyticsWorkspaceId: logAnalyticsWorkspace.outputs.id
Expand Down
4 changes: 2 additions & 2 deletions src/bicep/mlz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "11783352289111650944"
"templateHash": "2150776309753846228"
}
},
"parameters": {
Expand Down Expand Up @@ -8760,7 +8760,7 @@
"condition": "[and(parameters('deployDefender'), not(equals(variables('spokes')[copyIndex()].subscriptionId, parameters('hubSubscriptionId'))))]",
"type": "Microsoft.Resources/deployments",
"apiVersion": "2022-09-01",
"name": "[format('set-{0}-sub-defender', variables('spokes')[copyIndex()].name)]",
"name": "[format('set-{0}-sub-defender-{1}', variables('spokes')[copyIndex()].name, parameters('deploymentNameSuffix'))]",
"subscriptionId": "[variables('spokes')[copyIndex()].subscriptionId]",
"location": "[deployment().location]",
"properties": {
Expand Down

0 comments on commit e79b0c7

Please sign in to comment.