Skip to content

Commit

Permalink
just do it
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Feb 10, 2024
1 parent 1035535 commit 1101fb2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions image/entrypoints/apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ function apply() {
set -e

if [[ "$TERRAFORM_BACKEND_TYPE" == "cloud" || "$TERRAFORM_BACKEND_TYPE" == "remote" ]]; then
if [[ -z "$RUN_ID" ]]; then
if remote-run-id "$STEP_TMP_DIR/terraform_apply.stdout" >"$STEP_TMP_DIR/remote-run-id.stdout" 2>"$STEP_TMP_DIR/remote-run-id.stderr"; then
RUN_ID="$(<"$STEP_TMP_DIR/remote-run-id.stdout")"
set_output run_id "$RUN_ID"
else
debug_log "Failed to get remote run-id"
debug_file "$STEP_TMP_DIR/remote-run-id.stderr"
fi
fi
if remote-run-id "$STEP_TMP_DIR/terraform_apply.stdout" >"$STEP_TMP_DIR/remote-run-id.stdout" 2>"$STEP_TMP_DIR/remote-run-id.stderr"; then
RUN_ID="$(<"$STEP_TMP_DIR/remote-run-id.stdout")"
set_output run_id "$RUN_ID"
else
debug_log "Failed to get remote run-id"
debug_file "$STEP_TMP_DIR/remote-run-id.stderr"
fi
fi

if [[ "$TERRAFORM_BACKEND_TYPE" == "cloud" && $APPLY_EXIT -ne 0 ]] && grep -q "Error: Saved plan has no changes" "$STEP_TMP_DIR/terraform_apply.stderr"; then
Expand Down

0 comments on commit 1101fb2

Please sign in to comment.