Skip to content

Commit fc03db4

Browse files
Merge pull request #603 from microsoft/dev
fix: Dev to main
2 parents e16251b + 503c3d8 commit fc03db4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/deploy-KMGeneric.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,14 @@ jobs:
117117
id: deploy
118118
run: |
119119
set -e
120+
121+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
122+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
123+
120124
az deployment group create \
121125
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
122126
--template-file infra/main.bicep \
123-
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 azureAiServiceLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline" tags="{'SecurityControl':'Ignore'}"
127+
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 azureAiServiceLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline" tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
124128
125129
126130

infra/main.bicep

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ param existingLogAnalyticsWorkspaceId string = ''
151151
param existingAiFoundryAiProjectResourceId string = ''
152152

153153
@description('Optional. created by user name')
154-
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
154+
param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId
155+
155156

156157
@maxLength(5)
157158
@description('Optional. A unique text value for the solution. This is used to ensure resource names are unique for global resources. Defaults to a 5-character substring of the unique string generated from the subscription ID, resource group name, and solution name.')
@@ -217,7 +218,8 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
217218
'Full'
218219
).tags ?? {},
219220
{
220-
TemplateName: 'KM Generic'
221+
TemplateName: 'KM-Generic'
222+
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
221223
CreatedBy: createdBy
222224
},
223225
tags

0 commit comments

Comments
 (0)