Skip to content

Commit 6dcfe52

Browse files
Adding a hardcoded createdBy parameter to the deploy.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file.
1 parent bbb83ad commit 6dcfe52

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ jobs:
137137
imageTag="${IMAGE_TAG}" \
138138
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
139139
gptModelCapacity=150 \
140+
createdBy="Pipeline" \
140141
--output json
141142
142143
- name: Extract Web App and API App URLs

infra/main.bicep

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,23 @@ var replicaLocation = replicaRegionPairs[location]
165165
// Resources //
166166
// ============== //
167167

168-
var deployerInfo = deployer()
168+
169169
var allTags = union(
170170
{
171171
'azd-env-name': solutionName
172172
},
173173
tags
174174
)
175+
@description('Optional created by user name')
176+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
177+
175178
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
176179
name: 'default'
177180
properties: {
178181
tags: {
179182
...allTags
180183
TemplateName: 'MACAE'
181-
CreatedBy: split(deployerInfo.userPrincipalName, '@')[0]
184+
CreatedBy: createdBy
182185
}
183186
}
184187
}

0 commit comments

Comments
 (0)