Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from speee/escape-output
Browse files Browse the repository at this point in the history
Escape output
  • Loading branch information
rakiyoshi authored Nov 29, 2021
2 parents b1a5cce + 4a62f6b commit 908b78f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ runs:
if: steps.plan.outcome == 'success'
shell: bash
run: |
echo "::set-output name=result::$(terraform show tfplan)"
PLAN_RESULT=$(terraform show tfplan)
echo "::set-output name=result::${PLAN_RESULT//$'\n'/\\n}"
terraform show -json tfplan | jq -c '.resource_changes' > tfplan.resource_changes.json
# Ref: https://www.terraform.io/docs/internals/json-format.html#change-representation
RESOURCES_TO_BE_REPLACED=$(jq -c '. | map(select(.change.actions | length==2) ) | [.[].address]' < tfplan.resource_changes.json)
Expand Down

0 comments on commit 908b78f

Please sign in to comment.