Skip to content

Commit 4cf796b

Browse files
Add tag parameter
1 parent 26932f1 commit 4cf796b

5 files changed

Lines changed: 17 additions & 15 deletions

File tree

infra/main.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,9 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.13.
945945
: []
946946
tags: {
947947
...resourceGroup().tags
948+
...existingTags
948949
...allTags
949-
TemplateName: 'Code Modernization'
950-
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
951-
CreatedBy: createdBy
952-
DeploymentName: deployment().name
950+
...tags
953951
}
954952
enableTelemetry: enableTelemetry
955953
}

infra/main.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.43.8.12551",
9-
"templateHash": "4572051835005912799"
9+
"templateHash": "10586044166511921089"
1010
},
1111
"name": "Modernize Your Code Solution Accelerator",
1212
"description": "CSA CTO Gold Standard Solution Accelerator for Modernize Your Code. \r\n"
@@ -13103,11 +13103,11 @@
1310313103
},
1310413104
"dependsOn": [
1310513105
"applicationInsights",
13106+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').agentSvc)]",
1310613107
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
1310713108
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').ods)]",
1310813109
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').oms)]",
1310913110
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').monitor)]",
13110-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').agentSvc)]",
1311113111
"dataCollectionEndpoint",
1311213112
"logAnalyticsWorkspace",
1311313113
"virtualNetwork"
@@ -32421,9 +32421,9 @@
3242132421
},
3242232422
"dependsOn": [
3242332423
"aiServices",
32424+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
3242432425
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
3242532426
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
32426-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
3242732427
"virtualNetwork"
3242832428
]
3242932429
},
@@ -40888,8 +40888,8 @@
4088840888
},
4088940889
"dependsOn": [
4089040890
"appIdentity",
40891-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
4089240891
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
40892+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
4089340893
"logAnalyticsWorkspace",
4089440894
"virtualNetwork"
4089540895
]
@@ -51099,7 +51099,7 @@
5109951099
"appLogsConfiguration": "[if(parameters('enableMonitoring'), createObject('value', createObject('destination', 'log-analytics', 'logAnalyticsWorkspaceResourceId', if(variables('useExistingLogAnalytics'), parameters('existingLogAnalyticsWorkspaceId'), reference('logAnalyticsWorkspace').outputs.resourceId.value), 'logAnalyticsConfiguration', createObject('customerId', if(variables('useExistingLogAnalytics'), reference('existingLogAnalyticsWorkspace').customerId, reference('logAnalyticsWorkspace').outputs.logAnalyticsWorkspaceId.value), 'sharedKey', if(variables('useExistingLogAnalytics'), listKeys('existingLogAnalyticsWorkspace', '2025-07-01').primarySharedKey, listOutputsWithSecureValues('logAnalyticsWorkspace', '2025-04-01').primarySharedKey)))), createObject('value', null()))]",
5110051100
"workloadProfiles": "[if(parameters('enablePrivateNetworking'), createObject('value', createArray(createObject('name', 'Consumption', 'workloadProfileType', 'Consumption'))), createObject('value', createArray()))]",
5110151101
"tags": {
51102-
"value": "[shallowMerge(createArray(resourceGroup().tags, variables('allTags'), createObject('TemplateName', 'Code Modernization', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', parameters('createdBy'), 'DeploymentName', deployment().name)))]"
51102+
"value": "[shallowMerge(createArray(resourceGroup().tags, variables('existingTags'), variables('allTags'), parameters('tags')))]"
5110351103
},
5110451104
"enableTelemetry": {
5110551105
"value": "[parameters('enableTelemetry')]"

infra/main.parameters.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
},
4747
"vmAdminPassword": {
4848
"value": "${AZURE_ENV_VM_ADMIN_PASSWORD}"
49-
}
49+
},
50+
"tags": {
51+
"value": "${AZURE_ENV_TAGS}"
52+
}
5053
}
5154
}

infra/main.waf.parameters.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
},
5656
"enableScalability": {
5757
"value": true
58-
}
58+
},
59+
"tags": {
60+
"value": "${AZURE_ENV_TAGS}"
61+
}
5962
}
6063
}

infra/main_custom.bicep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,11 +888,9 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.13.
888888
: []
889889
tags: {
890890
...resourceGroup().tags
891+
...existingTags
891892
...allTags
892-
TemplateName: 'Code Modernization'
893-
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
894-
CreatedBy: createdBy
895-
DeploymentName: deployment().name
893+
...tags
896894
}
897895
enableTelemetry: enableTelemetry
898896
}

0 commit comments

Comments
 (0)