Skip to content

Commit 1a5c498

Browse files
Add user name as CreatedBy tag while deployment
1 parent 191a726 commit 1a5c498

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

infra/main.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,16 @@ var modelDeployment = {
134134

135135
var abbrs = loadJsonContent('./abbreviations.json')
136136

137+
var deployerInfo = deployer()
138+
137139
// ========== Resource Group Tag ========== //
138140
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
139141
name: 'default'
140142
properties: {
141143
tags: {
142144
...allTags
143145
TemplateName: 'Code Modernization'
146+
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
144147
}
145148
}
146149
}

0 commit comments

Comments
 (0)