Skip to content

Commit e8cfe81

Browse files
committed
Make early variables available for show and apply
1 parent 556203c commit e8cfe81

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

image/entrypoints/apply.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function apply() {
4242
fi
4343

4444
# shellcheck disable=SC2086
45-
debug_log $TOOL_COMMAND_NAME apply -input=false -no-color -lock-timeout=300s $PARALLEL_ARG $SAVED_PLAN_VARIABLES $PLAN_OUT
45+
debug_log $TOOL_COMMAND_NAME apply -input=false -no-color -lock-timeout=300s $PARALLEL_ARG $SAVED_PLAN_VARIABLES $EARLY_VARIABLE_ARGS $PLAN_OUT
4646
# shellcheck disable=SC2086
47-
(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME apply -input=false -no-color -lock-timeout=300s $PARALLEL_ARG $SAVED_PLAN_VARIABLES $PLAN_OUT) \
47+
(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME apply -input=false -no-color -lock-timeout=300s $PARALLEL_ARG $SAVED_PLAN_VARIABLES $EARLY_VARIABLE_ARGS $PLAN_OUT) \
4848
2>"$STEP_TMP_DIR/terraform_apply.stderr" \
4949
| $TFMASK \
5050
| tee "$STEP_TMP_DIR/terraform_apply.stdout"
@@ -146,7 +146,8 @@ else
146146
fi
147147

148148
if [[ -n "$PLAN_OUT" ]]; then
149-
if (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME show -json "$PLAN_OUT") >"$GITHUB_WORKSPACE/$WORKSPACE_TMP_DIR/plan.json" 2>"$STEP_TMP_DIR/terraform_show.stderr"; then
149+
# shellcheck disable=SC2086
150+
if (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME show -json "$PLAN_OUT" $EARLY_VARIABLE_ARGS) >"$GITHUB_WORKSPACE/$WORKSPACE_TMP_DIR/plan.json" 2>"$STEP_TMP_DIR/terraform_show.stderr"; then
150151
set_output json_plan_path "$WORKSPACE_TMP_DIR/plan.json"
151152
else
152153
debug_file "$STEP_TMP_DIR/terraform_show.stderr"

0 commit comments

Comments
 (0)