Skip to content

Commit

Permalink
Extract plan test correctly for opentofu
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Oct 23, 2023
1 parent f88bd36 commit a71c524
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ jobs:
exit 1
fi
if ! grep -q "will perform the following actions" '${{ steps.output.outputs.text_plan_path }}'; then
if ! grep -q "OpenTofu will perform the following actions" '${{ steps.output.outputs.text_plan_path }}'; then
echo "::error:: text_plan_path not set correctly"
exit 1
fi
Expand Down
4 changes: 3 additions & 1 deletion image/tools/compact_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ def compact_plan(input):

if not plan and (
line.startswith('Terraform used the selected providers') or
line.startswith('OpenTofu used the selected providers') or
line.startswith('An execution plan has been generated and is shown below') or
line.startswith('No changes') or
line.startswith('Error') or
line.startswith('Changes to Outputs:') or
line.startswith('Terraform will perform the following actions:')
line.startswith('Terraform will perform the following actions:') or
line.startswith('OpenTofu will perform the following actions:')
):
plan = True

Expand Down

0 comments on commit a71c524

Please sign in to comment.