feat!: support generic adoption variables #74
Workflow file for this run
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: Terraform | |
on: | |
- pull_request | |
env: | |
TF_PLUGIN_CACHE_DIR: ${{ github.workspace }}/.terraform.d/plugin-cache | |
jobs: | |
fmt: | |
name: "fmt" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: "1.5.5" | |
- name: Terraform fmt | |
run: terraform fmt -recursive -write=false -check -diff . | |
continue-on-error: true | |
validate: | |
name: "validate" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
terraform_version: ["1.5.5"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Terraform ${{ matrix.terraform_version }} | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ matrix.terraform_version }} | |
- name: Terraform Validate Root | |
run: cd "${GITHUB_WORKSPACE}" && terraform init -backend=false && AWS_REGION=us-east-1 terraform validate | |
- name: Terraform Validate Modules | |
run: for module in modules/*/; do cd "${GITHUB_WORKSPACE}/${module}" && terraform init -backend=false && AWS_REGION=us-east-1 terraform validate; done | |
- name: Terraform Validate Examples | |
run: for example in examples/*/; do cd "${GITHUB_WORKSPACE}/${example}" && terraform init -backend=false && AWS_REGION=us-east-1 terraform validate; done |