From 73a08476773ebc8b886268de7037b527aea35811 Mon Sep 17 00:00:00 2001 From: Kanchan-Microsoft Date: Tue, 28 Oct 2025 14:20:17 +0530 Subject: [PATCH] prevent removal of existing rg tags --- infra/main.bicep | 1 + infra/main.json | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/infra/main.bicep b/infra/main.bicep index fb3a8796..2a006e91 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -140,6 +140,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' properties: { tags: { + ...resourceGroup().tags ...allTags TemplateName: 'Code Modernization' Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF' diff --git a/infra/main.json b/infra/main.json index 2851c32d..65e90cdd 100644 --- a/infra/main.json +++ b/infra/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.37.4.10188", - "templateHash": "5944351688073580632" + "templateHash": "11292425781844372845" }, "name": "Modernize Your Code Solution Accelerator", "description": "CSA CTO Gold Standard Solution Accelerator for Modernize Your Code. \r\n" @@ -244,7 +244,7 @@ "apiVersion": "2021-04-01", "name": "default", "properties": { - "tags": "[shallowMerge(createArray(variables('allTags'), createObject('TemplateName', 'Code Modernization', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'))))]" + "tags": "[shallowMerge(createArray(resourceGroup().tags, variables('allTags'), createObject('TemplateName', 'Code Modernization', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'))))]" } }, "avmTelemetry": { @@ -26003,9 +26003,9 @@ }, "dependsOn": [ "appIdentity", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", "logAnalyticsWorkspace", "virtualNetwork" ]