Skip to content

terraform lint

terraform lint #85

Workflow file for this run

name: terraform lint
on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths:
- '**.tf'
- '**.tfvars'
- '**.tf.json'
- '**.tfvars.json'
# Manually triggered using GitHub's UI
workflow_dispatch:
jobs:
validate:
name: validate ${{matrix.env}}
strategy:
matrix:
env:
- env/production
runs-on: ubuntu-24.04
steps:
- name: Install Terraform
run: >
wget -O - https://apt.releases.hashicorp.com/gpg
| sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
| sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
- uses: actions/checkout@v4
- run: terraform init -backend=false
working-directory: ${{matrix.env}}
- run: terraform validate
working-directory: ${{matrix.env}}