Skip to content

Commit 85ec07d

Browse files
Merge pull request #525 from microsoft/dev
fix: Dev to macae-v2 branch
2 parents 71d7c60 + e7f78a9 commit 85ec07d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/deploy-waf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ jobs:
105105
id: deploy
106106
run: |
107107
set -e
108+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
109+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
110+
108111
az deployment group create \
109112
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
110113
--template-file infra/main.bicep \
@@ -118,6 +121,7 @@ jobs:
118121
enablePrivateNetworking=true \
119122
enableScalability=true \
120123
createdBy="Pipeline" \
124+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
121125
122126
123127
- name: Send Notification on Failure

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ jobs:
125125
IMAGE_TAG="latest"
126126
fi
127127
128+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
129+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
130+
128131
az deployment group create \
129132
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
130133
--template-file infra/main.bicep \
@@ -139,6 +142,7 @@ jobs:
139142
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
140143
gptModelCapacity=150 \
141144
createdBy="Pipeline" \
145+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \
142146
--output json
143147
144148
- name: Extract Web App and API App URLs

infra/main.bicep

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,17 @@ 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'
178179
properties: {
179180
tags: {
180181
...allTags
181182
TemplateName: 'MACAE'
183+
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
182184
CreatedBy: createdBy
183185
}
184186
}

0 commit comments

Comments
 (0)