From 72ca6f83c97024e6af204b12475abed2fd7f514b Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Thu, 11 Dec 2025 10:12:43 +0800 Subject: [PATCH] (iac): modify AWS resources-matrix workflow to align with component directory layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update watched paths from envs/* to component/* - Change matrix key from env → component --- ...ard-iac-pipeline-aws-resources-matrix.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 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 56ab558c..972d8ca2 100644 --- a/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml +++ b/.github/workflows/terraform-standard-iac-pipeline-aws-resources-matrix.yaml @@ -3,8 +3,8 @@ name: IAC Pipeline AWS Cloud Resources Matrix on: push: paths: - - 'iac-template/terraform-hcl-standard/aws-cloud/envs/dev-object/**' - - 'iac-template/terraform-hcl-standard/aws-cloud/envs/dev-ec2/**' + - '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' workflow_dispatch: inputs: @@ -14,7 +14,7 @@ on: default: 'true' env: - BASE_DIR: iac-template/terraform-hcl-standard/aws-cloud/envs + BASE_DIR: iac-template/terraform-hcl-standard/aws-cloud/component/ AWS_REGION: ap-northeast-1 DRY_RUN: ${{ github.event.inputs.dry_run || 'true' }} AWS_ROLE_ARN: arn:aws:iam::950604983695:role/IacDeployRole @@ -27,9 +27,9 @@ jobs: strategy: fail-fast: false matrix: - env: - - dev-object - - dev-ec2 + component: + - object + - ec2 steps: - uses: actions/checkout@v4 @@ -52,15 +52,15 @@ jobs: role-skip-session-tagging: true - name: Init - working-directory: ${{ env.BASE_DIR }}/${{ matrix.env }} + working-directory: ${{ env.BASE_DIR }}/${{ matrix.component }} run: make init - name: Plan - working-directory: ${{ env.BASE_DIR }}/${{ matrix.env }} + working-directory: ${{ env.BASE_DIR }}/${{ matrix.component }} run: make plan - name: Apply - working-directory: ${{ env.BASE_DIR }}/${{ matrix.env }} + working-directory: ${{ env.BASE_DIR }}/${{ matrix.component }} if: ${{ env.DRY_RUN == 'false' }} run: make apply @@ -69,6 +69,6 @@ jobs: run: echo "Dry run enabled → skip apply step." - name: Output - working-directory: ${{ env.BASE_DIR }}/${{ matrix.env }} + working-directory: ${{ env.BASE_DIR }}/${{ matrix.compoent }} if: ${{ env.DRY_RUN == 'false' }} run: terraform output -json