The TerraApprove action provides an easy way to use TerraApprove in your GitHub Actions workflow.
The action needs 2 options to be set:
tf_code_dir
: the directory where the Terraform code is locatedtf_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.
A repository is avaiable here with a complete examples.