Skip to content

Commit

Permalink
Format tf plan more nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnaab committed Feb 26, 2025
1 parent 255bee4 commit dc0a65f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/_terraform-plan-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ jobs:
working-directory: infra/cdktf/cdktf.out/stacks/${{ steps.get_stack_name.outputs.stack_name }}
run: |
terraform plan -out=tfplan -input=false
echo '<details><summary>Terraform Plan Output</summary>' > pr-comment.txt
terraform show -no-color tfplan >> tf-plan.txt
echo "<details><summary>$(tail -n 1 pr-comment.txt)</summary>" > pr-comment.txt
echo '' >> pr-comment.txt
echo '```terraform' >> pr-comment.txt
terraform show -no-color tfplan >> pr-comment.txt
cat tf-plan.txt >> pr-comment.txt
echo '```' >> pr-comment.txt
echo '</details>' >> pr-comment.txt
Expand Down

0 comments on commit dc0a65f

Please sign in to comment.