Skip to content

Commit

Permalink
check exit code of tf plan
Browse files Browse the repository at this point in the history
  • Loading branch information
tjcorr authored Oct 7, 2021
1 parent 8847422 commit b3704b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +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 || if [ $? -eq 2 ]; then exit 0; else exit 1; fi
run: terraform plan -detailed-exitcode -out tfplan || echo last code $?
id: tf-plan

# Save plan to artifacts
Expand Down

0 comments on commit b3704b5

Please sign in to comment.