Skip to content

Commit 2fcaf2b

Browse files
fix: Remove createdby from pipeline and add change Createdby logic in bice… (#678)
* Remove createdby from pipeline and add change Createdby logic in bicep file * Add 'createdBy' parameter to Azure deployment * Add 'createdBy' parameter for tagging
1 parent fd1af72 commit 2fcaf2b

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
@@ -275,8 +275,8 @@ resource existingLogAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces
275275

276276
var logAnalyticsWorkspaceResourceId = useExistingLogAnalytics ? existingLogAnalyticsWorkspaceId : logAnalyticsWorkspace!.outputs.resourceId
277277

278-
@description('Optional created by user name')
279-
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
278+
@description('Tag, Created by user name')
279+
param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId
280280

281281
// ========== Resource Group Tag ========== //
282282
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {

0 commit comments

Comments
 (0)