Skip to content

Commit 308e180

Browse files
Change Createdby tag logic
1 parent 11de7a8 commit 308e180

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
@@ -417,9 +417,9 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
417417
disableLocalAuth: true
418418
}
419419
}
420+
@description('Tag, Created by user name')
421+
param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId
420422

421-
@description('Optional created by user name')
422-
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
423423
// ========== Resource Group Tag ========== //
424424
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
425425
name: 'default'

0 commit comments

Comments
 (0)