Skip to content

GitHub action to install all the required Terraform tooling needed at CDS

License

Notifications You must be signed in to change notification settings

cds-snc/terraform-tools-setup

Repository files navigation

Terraform tools Setup GitHub Action

This repository contains a GitHub action that sets up all the tooling required for running Terraform in CDS CI/CD flows.

It currently download the following tool version, although each can be overriden with an environment variable:

Tool Version ENV name
conftest 0.36.0 CONFTEST_VERSION
terraform 1.3.6 TERRAFORM_VERSION
terragrunt 0.42.5 TERRAGRUNT_VERSION
TF Summarize 0.2.3 TF_SUMMARIZE_VERSION

Using the action

To use the action you can invoke it in the following way:

on: [push]

jobs:
  my_ci_flow:
    runs-on: ubuntu-latest
    steps:
      - name: setup terraform tools
        uses: cds-snc/terraform-tools-setup@v1
        env: # In case you want to override default versions
            CONFTEST_VERSION: 0.30.0 
            TERRAFORM_VERSION: 1.1.7
            TERRAGRUNT_VERSION: 0.36.3
            TF_SUMMARIZE_VERSION: 0.2.3

Updating versions and testing

To test the script you can run ./test_script.sh.

If you would like to update the default versions, you need to update the following lines in both get_tools.sh and test_script.sh

CONFTEST_VERSION="${CONFTEST_VERSION:-0.30.0}"
TERRAFORM_VERSION="${TERRAFORM_VERSION:-1.1.7}"
TERRAGRUNT_VERSION="${TERRAGRUNT_VERSION:-0.36.3}"
TF_SUMMARIZE_VERSION="${TF_SUMMARIZE_VERSION:-0.2.3}"

About

GitHub action to install all the required Terraform tooling needed at CDS

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •