Skip to content

Commit f52a90a

Browse files
Add deployer name in Createdby tag
1 parent 1ee2c16 commit f52a90a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Deployment/main.bicep

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ var resourceGroupLocation = resourceGroup().location
2323
// Load the abbrevations file required to name the azure resources.
2424
var abbrs = loadJsonContent('./abbreviations.json')
2525

26+
var deployerInfo = deployer()
27+
28+
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
29+
name: 'default'
30+
properties: {
31+
tags: {
32+
TemplateName: 'DKM'
33+
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
34+
}
35+
}
36+
}
2637

2738
// Create a storage account
2839
module gs_storageaccount 'bicep/azurestorageaccount.bicep' = {

0 commit comments

Comments
 (0)