Skip to content

devops-infra/action-terraform-validate

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action validating Terraform modules

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.

Badge swag

Master branch Other branches
GitHub repo GitHub code size in bytes GitHub last commit GitHub license
DockerHub Docker version Image size Docker Pulls

Reference

    - name: Validate Terraform modules
      uses: devops-infra/[email protected]
      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.

Examples

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/[email protected]

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/[email protected]
      with:
        dir_filter: modules/aws,modules/gcp