Skip to content

Commit

Permalink
rewrite exit code 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcorr authored Oct 7, 2021
1 parent bfb408a commit 8847422
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ jobs:
# Generates an execution plan for Terraform
# An exit code of 2 indicates there were changes detected. We want to change those to 0 so the task doesn't appear as failed.
- name: Terraform Plan
run: |
terraform plan -detailed-exitcode -out tfplan || echo does this run?
if [ $? -eq 0 ] || [ $? -eq 2 ]; then exit 0; else exit 1; fi
run: terraform plan -detailed-exitcode -out tfplan || if [ $? -eq 2 ]; then exit 0; else exit 1; fi
id: tf-plan

# Save plan to artifacts
Expand Down

0 comments on commit 8847422

Please sign in to comment.