Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
upload-cloud

GitHub Action

GitHub Action validating Terraform modules

v0.2

GitHub Action validating Terraform modules

upload-cloud

GitHub Action validating Terraform modules

GitHub Action automatically validating Terraform modules

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub Action validating Terraform modules

uses: devops-infra/action-terraform-validate@v0.2

Learn more about this action in devops-infra/action-terraform-validate

Choose a version

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/action-terraform-validate@v0.3
      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/action-terraform-validate@v0.3

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-terrraform-validate@v0.3
      with:
        dir_filter: modules/aws,modules/gcp