diff --git a/.github/workflows/merge_to_main_production.yml b/.github/workflows/merge_to_main_production.yml index fd5ba4b62..e884afc8f 100644 --- a/.github/workflows/merge_to_main_production.yml +++ b/.github/workflows/merge_to_main_production.yml @@ -80,17 +80,6 @@ jobs: chmod +x bin/terragrunt echo "bin" >> $GITHUB_PATH - - name: Get changed files - id: changed-files - uses: jitterbit/get-changed-files@v1 - with: - format: 'json' - - - name: Get touched Terragrunt configurations - run: | - CONFIGS=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*env?)\/(.*production?)\/(.*)\/").captures[2].string] | unique | select(length > 0)'` - echo "CONFIGS=$CONFIGS" >> $GITHUB_ENV - - name: Inject token authentication run: | git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/" diff --git a/.github/workflows/merge_to_main_staging.yml b/.github/workflows/merge_to_main_staging.yml index aec661db9..2be7cafb3 100644 --- a/.github/workflows/merge_to_main_staging.yml +++ b/.github/workflows/merge_to_main_staging.yml @@ -82,22 +82,6 @@ jobs: chmod +x bin/terragrunt echo "bin" >> $GITHUB_PATH - - name: Get changed files - id: changed-files - uses: jitterbit/get-changed-files@v1 - with: - format: 'json' - - - name: Get touched Terragrunt modules - run: | - MODULES=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*aws?)\/(.*)\/").captures[1].string] | unique | select(length > 0)'` - echo "MODULES=$MODULES" >> $GITHUB_ENV - - - name: Get touched Terragrunt configurations - run: | - CONFIGS=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*env?)\/(.*staging?)\/(.*)\/").captures[2].string] | unique | select(length > 0)'` - echo "CONFIGS=$CONFIGS" >> $GITHUB_ENV - - name: Apply aws/common run: | cd env/staging/common @@ -144,6 +128,7 @@ jobs: ../../../bin/terragrunt apply --terragrunt-non-interactive -auto-approve - name: Bump version and push tag + if: github.event_name != 'workflow_dispatch' # We don't want to tag new versions when launched via workflow_dispatch since only environment variables changed uses: mathieudutour/github-tag-action@v4.6 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/aws/common/outputs.tf b/aws/common/outputs.tf index c616e7327..9b247eb15 100644 --- a/aws/common/outputs.tf +++ b/aws/common/outputs.tf @@ -60,6 +60,6 @@ output "s3_bucket_csv_upload_bucket_name" { output "environment_variables_current_secret_string" { description = "Environment variables shared between EKS and Lambda" - value = data.aws_secretsmanager_secret_version.environment_variables_current.secret_string + value = data.aws_secretsmanager_secret_version.current.secret_string sensitive = true } diff --git a/aws/common/secretsmanager.tf b/aws/common/secretsmanager.tf index 574057ba8..cd2f27e91 100644 --- a/aws/common/secretsmanager.tf +++ b/aws/common/secretsmanager.tf @@ -6,6 +6,6 @@ resource "aws_secretsmanager_secret" "environment_variables" { } } -data "aws_secretsmanager_secret_version" "environment_variables_current" { +data "aws_secretsmanager_secret_version" "current" { secret_id = aws_secretsmanager_secret.environment_variables.id }