diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e51eea9..c1ff12e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ When using an action you can specify the version as: - `@v1.17` to use the latest patch release for the specific minor version - `@v1` to use the latest patch release for the specific major version +## Unreleased + +### Fixed +- Add `terraform plan` output that was missing from the workflow log + ## [1.17.1] - 2021-10-06 ### Fixed diff --git a/image/actions.sh b/image/actions.sh index 4aaf12b3..ea71003b 100644 --- a/image/actions.sh +++ b/image/actions.sh @@ -260,9 +260,9 @@ function random_string() { function write_credentials() { format_tf_credentials >>"$HOME/.terraformrc" - chown -R --reference "$HOME" "$HOME/.terraformrc" + chown --reference "$HOME" "$HOME/.terraformrc" netrc-credential-actions >>"$HOME/.netrc" - chown -R --reference "$HOME" "$HOME/.netrc" + chown --reference "$HOME" "$HOME/.netrc" chmod 700 /.ssh if [[ -v TERRAFORM_SSH_KEY ]]; then diff --git a/image/entrypoints/plan.sh b/image/entrypoints/plan.sh index 36130b09..20afb668 100755 --- a/image/entrypoints/plan.sh +++ b/image/entrypoints/plan.sh @@ -26,6 +26,9 @@ if [[ $PLAN_EXIT -eq 1 ]]; then fi fi +cat "$STEP_TMP_DIR/plan.txt" +cat "$STEP_TMP_DIR/terraform_plan.stderr" + if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "issue_comment" || "$GITHUB_EVENT_NAME" == "pull_request_review_comment" || "$GITHUB_EVENT_NAME" == "pull_request_target" || "$GITHUB_EVENT_NAME" == "pull_request_review" ]]; then if [[ "$INPUT_ADD_GITHUB_COMMENT" == "true" || "$INPUT_ADD_GITHUB_COMMENT" == "changes-only" ]]; then