Fix formatting: fully terraform fmt-compliant #4
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: Terraform Validate & Security Check | |
on: | |
push: | |
paths: | |
- 'terraform/**.tf' | |
pull_request: | |
paths: | |
- 'terraform/**.tf' | |
jobs: | |
terraform: | |
name: Validate & Check Terraform | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Terraform Init | |
run: terraform -chdir=terraform init | |
- name: Terraform Validate | |
run: terraform -chdir=terraform validate | |
- name: Terraform fmt check | |
run: terraform -chdir=terraform fmt -check | |
- name: Install tfsec (static analysis) | |
run: | | |
curl -s https://raw.githubusercontent.com/aquasecurity/tfsec/master/scripts/install_linux.sh | bash | |
- name: Run tfsec | |
run: tfsec terraform/ |