diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 82f0941b1..11f4dd947 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -137,6 +137,7 @@ jobs: imageTag="${IMAGE_TAG}" \ azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \ gptModelCapacity=150 \ + createdBy="Pipeline" \ --output json - name: Extract Web App and API App URLs diff --git a/infra/main.bicep b/infra/main.bicep index 56589a8d2..8bedd7894 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -165,20 +165,23 @@ var replicaLocation = replicaRegionPairs[location] // Resources // // ============== // -var deployerInfo = deployer() + var allTags = union( { 'azd-env-name': solutionName }, tags ) +@description('Optional created by user name') +param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0] + resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' properties: { tags: { ...allTags TemplateName: 'MACAE' - CreatedBy: split(deployerInfo.userPrincipalName, '@')[0] + CreatedBy: createdBy } } }