Skip to content

Commit 035868e

Browse files
Add condition to deployer
1 parent c900215 commit 035868e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

infra/main.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,15 @@ param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags =
178178
var aiFoundryAiServicesAiProjectResourceName = 'proj-${solutionSuffix}'
179179

180180
var deployerInfo = deployer()
181+
var isDeploerNull = empty(deployerInfo.userPrincipalName) ? true : false
181182
// ========== Resource Group Tag ========== //
182183
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
183184
name: 'default'
184185
properties: {
185186
tags: {
186187
...tags
187188
TemplateName: 'Client Advisor'
188-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
189+
CreatedBy: !isDeploerNull?split(deployerInfo.userPrincipalName, '@')[0] : ''
189190
}
190191
}
191192
}

0 commit comments

Comments
 (0)