feat: Add support for optional Transit Gateway subnets in AWS VPC mod… #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| env: | |
| TF_VERSION: "1.14.8" | |
| jobs: | |
| fmt: | |
| name: Terraform fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: ${{ env.TF_VERSION }} | |
| - run: terraform fmt -recursive -check . | |
| validate: | |
| name: Validate (${{ matrix.workspace }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| workspace: [root, prod, nonprod, sandbox] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: ${{ env.TF_VERSION }} | |
| - run: terraform -chdir=workspaces/${{ matrix.workspace }} init -backend=false | |
| - run: terraform -chdir=workspaces/${{ matrix.workspace }} validate | |
| trivy: | |
| name: Trivy IaC scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: aquasecurity/trivy-action@0.35.0 | |
| with: | |
| scan-type: config | |
| scan-ref: . | |
| exit-code: 1 | |
| severity: CRITICAL,HIGH | |
| format: table | |
| security: | |
| name: Secret scan | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: read | |
| packages: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} | |
| GITLEAKS_CONFIG: .gitleaks.toml |