From 2a987c9fbb39c1c68a323b7c4bdabc4b9cd4cf14 Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Fri, 19 Sep 2025 12:58:33 +0530 Subject: [PATCH 1/4] added tags in CI Pipeline Validate Deployment - DKM --- .github/workflows/CI.yml | 8 +++++++- infra/main.bicep | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97c3f5f1..31552c94 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,6 +5,7 @@ on: - main # Adjust this to the branch you want to trigger the deployment on - dev - demo + - CI-Pipeline-dkm schedule: - cron: "0 10,22 * * *" # Runs at 10:00 AM and 10:00 PM GMT @@ -190,6 +191,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 +215,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..e909900f 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -112,7 +112,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { properties: { tags: { ...tags - TemplateName: 'DKM' + TemplateName: enablePrivateNetworking ? 'DKM-WAF' : 'DKM' CreatedBy: createdBy } } From 2b9fca04488c30f1ff5db0d945b44640918e822b Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Fri, 19 Sep 2025 14:48:22 +0530 Subject: [PATCH 2/4] removed my feature branch from CI.yml file --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 31552c94..2df04687 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,7 +5,6 @@ on: - main # Adjust this to the branch you want to trigger the deployment on - dev - demo - - CI-Pipeline-dkm schedule: - cron: "0 10,22 * * *" # Runs at 10:00 AM and 10:00 PM GMT From eaddd812b4d8005ad7f4bc425fb26616a5783f43 Mon Sep 17 00:00:00 2001 From: "Niraj Chaudhari (Persistent Systems Inc)" Date: Tue, 23 Sep 2025 09:20:01 +0530 Subject: [PATCH 3/4] Change CreatedBy tag logic in bicep --- infra/main.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/main.bicep b/infra/main.bicep index e909900f..911bb807 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' = { From bfd6e8f919647933efff7d2e1bfa57a307772230 Mon Sep 17 00:00:00 2001 From: VishalS-Microsoft Date: Tue, 23 Sep 2025 16:50:42 +0530 Subject: [PATCH 4/4] added new 'type' tag --- infra/main.bicep | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/main.bicep b/infra/main.bicep index 911bb807..0927a2b9 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -112,7 +112,8 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { properties: { tags: { ...tags - TemplateName: enablePrivateNetworking ? 'DKM-WAF' : 'DKM' + TemplateName: 'DKM' + Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF' CreatedBy: createdBy } }