Skip to content

Commit 32989a9

Browse files
Merge pull request microsoft#433 from microsoft/psl-CreatedBy-Tag
chore: Add deployer name in Createdby tag
2 parents 9c2983c + d6a956b commit 32989a9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

infra/main.bicep

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,25 @@ var replicaLocation = replicaRegionPairs[location]
165165
// Resources //
166166
// ============== //
167167

168+
var deployerInfo = deployer()
169+
var allTags = union(
170+
{
171+
'azd-env-name': solutionName
172+
},
173+
tags
174+
)
175+
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
176+
name: 'default'
177+
properties: {
178+
tags: {
179+
...allTags
180+
TemplateName: 'MACAE'
181+
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
182+
}
183+
}
184+
}
185+
186+
168187
#disable-next-line no-deployments-resources
169188
resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableTelemetry) {
170189
name: '46d3xbcp.ptn.sa-multiagentcustauteng.${replace('-..--..-', '.', '-')}.${substring(uniqueString(deployment().name, location), 0, 4)}'

0 commit comments

Comments
 (0)