Skip to content

Fix formatting: fully terraform fmt-compliant #4

Fix formatting: fully terraform fmt-compliant

Fix formatting: fully terraform fmt-compliant #4

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/