Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Infrastructure Checks
name: Lint and Validate Terraform

on:
push:
paths:
- '**/*.tf'
- '.github/workflows/infrastructure-checks.yml'
- "**/*.tf"
- ".github/workflows/lint-and-validate-terraform.yml"
workflow_dispatch:

permissions:
contents: read
checks: write

jobs:
terraform_validation:
name: Terraform Lint and Validate
Expand All @@ -15,27 +19,21 @@ jobs:
run:
shell: bash
steps:
- name: Harden the runner (Audit all outbound calls)
- name: Harden the runner (audit all outbound calls)
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
with:
egress-policy: audit

- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.4.2

- name: Setup Terraform
# This action installs a specific version of Terraform.
- name: Install Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: 1.9.0

- name: Terraform Format Check
terraform_version: 1.9.0
- name: terraform fmt -check=true -recursive
run: terraform fmt -check=true -recursive

- name: Terraform Init
- name: terraform init -backend=false
run: terraform init -backend=false

- name: Terraform Validate
- name: terraform validate
run: terraform validate

call_tflint_workflow:
Expand Down