diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df897cd..3ea957a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,11 +14,13 @@ on: pull_request: paths: - 'modules/**' + - '.tflint.hcl' - '.github/workflows/ci.yml' push: branches: [main] paths: - 'modules/**' + - '.tflint.hcl' - '.github/workflows/ci.yml' permissions: diff --git a/.github/workflows/terraform-validate.yml b/.github/workflows/terraform-validate.yml deleted file mode 100644 index abc8de2..0000000 --- a/.github/workflows/terraform-validate.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: terraform-validate - -on: - pull_request: - paths: - - 'modules/**' - - '.github/workflows/terraform-validate.yml' - push: - branches: [main] - -permissions: - contents: read - -jobs: - validate: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - module: - # Internal tier modules (one implementation per tier x cloud) - - modules/single-vm/aws - - modules/single-vm/azure - - modules/ha-hot-hot/aws - - modules/ha-hot-hot/azure - - modules/unlimited-scale/aws - - modules/unlimited-scale/azure - # Product-first wrapper modules (the public API) - - modules/asm-aws-single - - modules/asm-aws-ha - - modules/asm-aws-autoscale - - modules/asm-azure-single - - modules/asm-azure-ha - - modules/asm-azure-autoscale - - modules/sat-aws-single - - modules/sat-aws-ha - - modules/sat-aws-autoscale - - modules/sat-azure-single - - modules/sat-azure-ha - - modules/sat-azure-autoscale - # Supporting modules - - modules/network/aws - - modules/network/azure - steps: - - uses: actions/checkout@v4 - - - uses: hashicorp/setup-terraform@v3 - with: - terraform_version: 1.9.5 - - - name: terraform fmt - run: terraform -chdir=${{ matrix.module }} fmt -check -recursive - - - name: terraform init -backend=false - run: terraform -chdir=${{ matrix.module }} init -backend=false - - - name: terraform validate - run: terraform -chdir=${{ matrix.module }} validate diff --git a/.github/workflows/tflint.yml b/.github/workflows/tflint.yml deleted file mode 100644 index eacf125..0000000 --- a/.github/workflows/tflint.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: tflint - -on: - pull_request: - paths: - - 'modules/**' - - '.tflint.hcl' - - '.github/workflows/tflint.yml' - push: - branches: [main] - -permissions: - contents: read - -jobs: - tflint: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - module: - # Internal tier modules - - modules/single-vm/aws - - modules/single-vm/azure - - modules/ha-hot-hot/aws - - modules/ha-hot-hot/azure - - modules/unlimited-scale/aws - - modules/unlimited-scale/azure - # Product-first wrappers - - modules/asm-aws-single - - modules/asm-aws-ha - - modules/asm-aws-autoscale - - modules/asm-azure-single - - modules/asm-azure-ha - - modules/asm-azure-autoscale - - modules/sat-aws-single - - modules/sat-aws-ha - - modules/sat-aws-autoscale - - modules/sat-azure-single - - modules/sat-azure-ha - - modules/sat-azure-autoscale - # Supporting - - modules/network/aws - - modules/network/azure - steps: - - uses: actions/checkout@v4 - - - uses: terraform-linters/setup-tflint@v4 - with: - tflint_version: v0.53.0 - - - name: tflint --init - run: tflint --init - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: tflint - run: tflint --chdir=${{ matrix.module }} --recursive --format=compact