From c9235aef2bd902464a92ff685e3c3016c851b5ed Mon Sep 17 00:00:00 2001 From: cloudneutral Date: Thu, 11 Dec 2025 11:02:13 +0800 Subject: [PATCH] Fix AWS resources matrix workflow auth configuration --- ...raform-standard-iac-pipeline-aws-resources-matrix.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml b/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml index 08be67f6..32884dcf 100644 --- a/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml +++ b/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml @@ -5,7 +5,7 @@ on: paths: - 'iac-template/terraform-hcl-standard/aws-cloud/component/ec2/**' - 'iac-template/terraform-hcl-standard/aws-cloud/component/object/**' - - '.github/workflows/terraform-standard-iac-pipeline-resources-matrix.yaml' + - '.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml' workflow_dispatch: inputs: dry_run: @@ -21,7 +21,7 @@ env: jobs: terraform: - name: "${{ matrix.env }} :: pipeline (dry_run=${{ inputs.dry_run }})" + name: "${{ matrix.component }} :: pipeline (dry_run=${{ inputs.dry_run }})" runs-on: ubuntu-latest strategy: @@ -46,9 +46,11 @@ jobs: with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }} aws-region: ${{ env.AWS_REGION }} role-to-assume: ${{ env.AWS_ROLE_ARN }} role-session-name: github-actions + role-chaining: true role-skip-session-tagging: true - name: Init @@ -69,6 +71,6 @@ jobs: run: echo "Dry run enabled → skip apply step." - name: Output - working-directory: ${{ env.BASE_DIR }}/${{ matrix.compoent }} + working-directory: ${{ env.BASE_DIR }}/${{ matrix.component }} if: ${{ env.DRY_RUN == 'false' }} run: terraform output -json