diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97c3f5f1..2df04687 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -190,6 +190,10 @@ jobs: id: deploy run: | set -e + + # Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ + current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ") + az deployment group create \ --name ${{ env.SOLUTION_PREFIX }}-deployment \ --resource-group ${{ env.RESOURCE_GROUP_NAME }} \ @@ -210,7 +214,8 @@ jobs: enableTelemetry=true \ enableRedundancy=false \ enableScalability=false \ - createdBy="Pipeline" + createdBy="Pipeline" \ + tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" - name: Get Deployment Output and extract Values id: get_output diff --git a/infra/main.bicep b/infra/main.bicep index 29dccf3d..0927a2b9 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -104,7 +104,7 @@ param enableScalability bool = false param aiDeploymentsLocation string @description('Optional created by user name') -param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0] +param createdBy string = contains(deployer(), 'userPrincipalName')? split(deployer().userPrincipalName, '@')[0]: deployer().objectId // ========== Resource Group Tag ========== // resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { @@ -113,6 +113,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { tags: { ...tags TemplateName: 'DKM' + Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF' CreatedBy: createdBy } }