Skip to content
award

GitHub Action

TerraApprove

v0.0.8 Pre-release

TerraApprove

award

TerraApprove

Validate the Terraform plan against the code base and output if approval is needed

Installation

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

              

- name: TerraApprove

uses: giovannibaratta/[email protected]

Learn more about this action in giovannibaratta/terraapprove-github-action

Choose a version

TerraApprove action

The TerraApprove action provides an easy way to use TerraApprove in your GitHub Actions workflow.

Usage

The action needs 2 options to be set:

  • tf_code_dir: the directory where the Terraform code is located
  • tf_plan_json_file: the path to the Terraform plan JSON file
...
steps:
  - name: TerraApprove
    id: terraapprove
    uses: giovannibaratta/[email protected]
    with:
      tf_code_dir: example-01
      tf_plan_json_file: example-01/plan.json

  - name: TerraApprove output
    run: |
      echo "Approval required: ${{ steps.terraapprove.outputs.approval_required }}"

Additionally mode can be set to change the beahviour of the validator.

Examples

A repository is avaiable here with a complete examples.