File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,18 +106,22 @@ param aiDeploymentsLocation string
106106@description ('Optional created by user name' )
107107param createdBy string = contains (deployer (), 'userPrincipalName' )? split (deployer ().userPrincipalName , '@' )[0 ]: deployer ().objectId
108108
109+ var existingTags = resourceGroup ().tags ?? {}
110+
109111// ========== Resource Group Tag ========== //
110112resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
111113 name : 'default'
112114 properties : {
113- tags : {
114- ...resourceGroup ().tags
115- ...tags
116- TemplateName : 'DKM'
117- Type : enablePrivateNetworking ? 'WAF' : 'Non-WAF'
118- CreatedBy : createdBy
119- DeploymentName : deployment ().name
120- }
115+ tags : union (
116+ existingTags ,
117+ tags ,
118+ {
119+ TemplateName : 'DKM'
120+ Type : enablePrivateNetworking ? 'WAF' : 'Non-WAF'
121+ CreatedBy : createdBy
122+ DeploymentName : deployment ().name
123+ }
124+ )
121125 }
122126}
123127
You can’t perform that action at this time.
0 commit comments