Skip to content

Merge pull request #292 from willroberts/update-docs #120

Merge pull request #292 from willroberts/update-docs

Merge pull request #292 from willroberts/update-docs #120

name: lint_terraform
on:
push:
branches:
- main
pull_request:
paths:
- terraform/**.tf
jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v3
- name: install terraform
run: |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [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=1.3.0
- name: install tflint
run: curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
- name: lint terraform code
run: scripts/tflint.sh