Skip to content

Commit 314070a

Browse files
Update Created by tag logic
1 parent 407b9cb commit 314070a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infra/main.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)