diff --git a/.github/workflows/RAdeploy.yml b/.github/workflows/RAdeploy.yml index 0a90e379..15e5b8ff 100644 --- a/.github/workflows/RAdeploy.yml +++ b/.github/workflows/RAdeploy.yml @@ -101,10 +101,13 @@ 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/bicep/main.bicep \ - --parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} createdBy="Pipeline" + --parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} createdBy="Pipeline" tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" - name: List KeyVaults and Store in Array id: list_keyvaults run: | diff --git a/infra/bicep/main.bicep b/infra/bicep/main.bicep index 6b5665d0..b4769741 100644 --- a/infra/bicep/main.bicep +++ b/infra/bicep/main.bicep @@ -13,6 +13,9 @@ var resourceGroupLocation = resourceGroup().location var resourceGroupName = resourceGroup().name var subscriptionId = subscription().subscriptionId +@description('Optional. The tags to apply to all deployed Azure resources.') +param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {} + var solutionLocation = resourceGroupLocation var baseUrl = 'https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/byoc-researcher/' @@ -23,6 +26,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = { name: 'default' properties: { tags: { + ...tags TemplateName: 'Research Assistant' CreatedBy: createdBy }