Skip to content

Commit cb448da

Browse files
Merge pull request #520 from microsoft/psl-removecreatetagfrompipeline
fix: Remove Createdby Parameter from deploy.yml and change logic in bicep
2 parents 287ef57 + 28a6e0b commit cb448da

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

infra/main.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ var allTags = union(
170170
},
171171
tags
172172
)
173-
@description('Optional created by user name')
174-
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
173+
@description('Tag, Created by user name')
174+
param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId
175+
175176

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

0 commit comments

Comments
 (0)