Skip to content

Commit 4339834

Browse files
update createdby tag logic in main_custom.bicep
1 parent 314070a commit 4339834

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infra/main_custom.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ var allTags = union(
223223
},
224224
tags
225225
)
226-
@description('Optional created by user name')
227-
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
226+
@description('Tag, Created by user name')
227+
param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId
228228

229229
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
230230
name: 'default'

0 commit comments

Comments
 (0)