diff --git a/.github/workflows/deploy-waf.yml b/.github/workflows/deploy-waf.yml index eb0e5a617..108cb6888 100644 --- a/.github/workflows/deploy-waf.yml +++ b/.github/workflows/deploy-waf.yml @@ -105,6 +105,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 \ --resource-group ${{ env.RESOURCE_GROUP_NAME }} \ --template-file infra/main.bicep \ @@ -118,6 +122,7 @@ jobs: enablePrivateNetworking=true \ enableScalability=true \ createdBy="Pipeline" \ + tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" - name: Send Notification on Failure diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 026b94242..ca921566f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -125,6 +125,9 @@ jobs: IMAGE_TAG="latest" fi + # 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 \ --resource-group ${{ env.RESOURCE_GROUP_NAME }} \ --template-file infra/main.bicep \ @@ -139,6 +142,7 @@ jobs: azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \ gptModelCapacity=150 \ createdBy="Pipeline" \ + tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \ --output json - name: Extract Web App and API App URLs diff --git a/infra/main.bicep b/infra/main.bicep index 9895f3c2a..13e3f1983 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -232,6 +232,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { tags: { ...allTags TemplateName: 'MACAE' + Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF' CreatedBy: createdBy } } @@ -2020,7 +2021,7 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = { enableSoftDelete: true softDeleteRetentionInDays: 7 diagnosticSettings: enableMonitoring - ? [{ workspaceResourceId: logAnalyticsWorkspace!.outputs.resourceId }] + ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : [] // WAF aligned configuration for Private Networking privateEndpoints: enablePrivateNetworking diff --git a/infra/main_custom.bicep b/infra/main_custom.bicep index f01568b53..3003b0c21 100644 --- a/infra/main_custom.bicep +++ b/infra/main_custom.bicep @@ -232,6 +232,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { tags: { ...allTags TemplateName: 'MACAE' + Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF' CreatedBy: createdBy } } @@ -2061,7 +2062,7 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = { enableSoftDelete: true softDeleteRetentionInDays: 7 diagnosticSettings: enableMonitoring - ? [{ workspaceResourceId: logAnalyticsWorkspace!.outputs.resourceId }] + ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : [] // WAF aligned configuration for Private Networking privateEndpoints: enablePrivateNetworking