Migrate to AWS Load Balancer Controller #219
This file contains 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: Check Terraform | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'terraform/**' | |
- 'terraform-bootstrap/**' | |
pull_request: | |
paths: | |
- 'terraform/**' | |
- 'terraform-bootstrap/**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: "~1.9.7" | |
- name: Lint Terraform code | |
run: terraform fmt -check -diff -recursive | |
validate: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
directory: | |
- terraform/production | |
- terraform/staging | |
- terraform-bootstrap | |
defaults: | |
run: | |
working-directory: ${{ matrix.directory }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: "~1.9.7" | |
- name: Initialize Terraform (offline only) | |
run: terraform init -backend=false | |
- name: Validate Terraform code | |
run: terraform validate |