Skip to content

Commit 97ecae5

Browse files
Bicep changes to add Created By tag while deployment
1 parent 276d77b commit 97ecae5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

infra/main.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ var solutionSuffix = toLower(trim(replace(
105105
@description('Optional. The tags to apply to all deployed Azure resources.')
106106
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
107107

108+
var deployerInfo = deployer()
108109
// ========== Resource Group Tag ========== //
109110
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
110111
name: 'default'
111112
properties: {
112113
tags: {
113114
... tags
114115
TemplateName: 'Docgen'
116+
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
115117
}
116118
}
117119
}

0 commit comments

Comments
 (0)