Replies: 1 comment 1 reply
-
You can use the - name: Check destroy
if: steps.plan.outputs.to_destroy > 0
run: |
echo "Plan would destroy ${{ steps.plan.outputs.to_destroy }} resources."
exit 1 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Would it be possible to add a boolean output when the terraform plan contains destructive changes? This is something we gate around using vanilla
terraform
cli in GitHub Actions - and I've always thought it would be nice if it were one of the available detailed exit codes or available via a convenience output (e.g.destroy: [true|false]
).In GHA, this is what we've been doing, but doesn't seem to be possible with your action as the stdout is empty.
Unfortunately, when using your actions for running the plan - the
stdout
output appears to be redirected and unavailable for inspection in subsequent steps. I cancat
the output from${{ github.workspace }}/${{ steps.plan.outputs.text_plan_path }}
- but thought others might find it useful as well.If this is something your action could natively support it would be a godsend for me. Do you think this is possible/has any value?
Beta Was this translation helpful? Give feedback.
All reactions