From 92498d3b1dd62bba93e81cc9695bc60672475593 Mon Sep 17 00:00:00 2001 From: "Niraj Chaudhari (Persistent Systems Inc)" Date: Fri, 5 Sep 2025 15:48:29 +0530 Subject: [PATCH] Adding a hardcoded createdBy parameter to the deploy.yml file to prevent validation pipeline failures caused by the deployer function in the Bicep file. --- .github/workflows/deploy.yml | 1 + infra/main.bicep | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a4152fc1..a8cfb140 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -150,6 +150,7 @@ jobs: gptModelVersion="2024-08-06" \ gptDeploymentCapacity="30" \ aiDeploymentsLocation="${{ env.AZURE_LOCATION }}" \ + createdBy="Pipeline" \ --query "properties.outputs" -o json); then echo "❌ Deployment failed. See logs above." exit 1 diff --git a/infra/main.bicep b/infra/main.bicep index c982f793..abd6f125 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -417,14 +417,16 @@ module applicationInsights 'br/public:avm/res/insights/component:0.6.0' = { disableLocalAuth: true } } -var deployerInfo = deployer() + +@description('Optional created by user name') +param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0] // ========== Resource Group Tag ========== // resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' properties: { tags: { TemplateName: 'Content Processing' - CreatedBy: split(deployerInfo.userPrincipalName, '@')[0] + CreatedBy: createdBy } } }