GitHub Action automatically validating Terraform modules.
Dockerized as devopsinfra/action-terraform-validate.
Features:
- Main action is using
terraform validate
. - It's a stripped down image of my other creation - devops-infra/docker-terragrunt - framework for managing Infrastructure-as-a-Code.
- it's main use will be everywhere where Terraform is used and is great for statically or actively checking modules' sources.
- name: Validate Terraform modules
uses: devops-infra/action-terraform-validate@v0.3.1
with:
dir_filter: modules
Input Variable | Required | Default | Description |
---|---|---|---|
dir_filter | No | * |
Prefixes or sub-directories to search for Terraform modules. Use comma as separator. |
Validate whole Terraform setup in repository root. Run the Action via GitHub.
name: Validate Terraform
on:
push
jobs:
terraform-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate Terraform configuration
uses: devops-infra/action-terraform-validate@v0.3.1
Validate Terraform modules only in modules/aws
and modules/gcp
directories. Run the Action via DockerHub.
name: Validate Terraform
on:
push
jobs:
terraform-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate Terraform modules
uses: devops-infra/action-terraform-validate@v0.3.1
with:
dir_filter: modules/aws,modules/gcp