chore(ci): change tf backend for validate #10
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 Checks | |
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
jobs: | |
terraform-lint: | |
name: Terraform Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Install tflint | |
run: | | |
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash | |
- name: Run tflint | |
run: tflint | |
terraform-fmt: | |
name: Terraform Format Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Run terraform fmt check | |
run: terraform fmt -check | |
terraform-validate: | |
name: Terraform Validation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Initialize Terraform | |
run: terraform init -backend=false | |
- name: Run terraform validate | |
run: terraform validate |