Skip to content

Commit b654199

Browse files
added tags in custom bicep
1 parent 417fb34 commit b654199

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

infra/main_custom.bicep

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,26 @@ var replicaLocation = replicaRegionPairs[location]
196196
// Resources //
197197
// ============== //
198198

199+
var allTags = union(
200+
{
201+
'azd-env-name': solutionName
202+
},
203+
tags
204+
)
205+
@description('Optional created by user name')
206+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
207+
208+
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
209+
name: 'default'
210+
properties: {
211+
tags: {
212+
...allTags
213+
TemplateName: 'MACAE'
214+
CreatedBy: createdBy
215+
}
216+
}
217+
}
218+
199219
#disable-next-line no-deployments-resources
200220
resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) {
201221
name: '46d3xbcp.ptn.sa-multiagentcustauteng.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'

0 commit comments

Comments
 (0)