|
14 | 14 | init-backend-default-workspace |
15 | 15 |
|
16 | 16 | set +e |
17 | | -(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace list -no-color) \ |
| 17 | +# shellcheck disable=SC2086 |
| 18 | +(cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace list $VARIABLE_ARGS -no-color) \ |
18 | 19 | 2>"$STEP_TMP_DIR/terraform_workspace_list.stderr" \ |
19 | 20 | >"$STEP_TMP_DIR/terraform_workspace_list.stdout" |
20 | 21 |
|
|
32 | 33 |
|
33 | 34 | if workspace_exists "$INPUT_WORKSPACE" <"$STEP_TMP_DIR/terraform_workspace_list.stdout"; then |
34 | 35 | echo "Workspace appears to exist, selecting it" |
35 | | - (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace select -no-color "$INPUT_WORKSPACE") |
| 36 | + # shellcheck disable=SC2086 |
| 37 | + (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace select $VARIABLE_ARGS -no-color "$INPUT_WORKSPACE") |
36 | 38 | else |
37 | 39 | echo "Workspace does not appear to exist, attempting to create it" |
38 | 40 |
|
39 | 41 | set +e |
40 | | - (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace new -no-color -lock-timeout=300s "$INPUT_WORKSPACE") \ |
| 42 | + # shellcheck disable=SC2086 |
| 43 | + (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace new $VARIABLE_ARGS -no-color -lock-timeout=300s "$INPUT_WORKSPACE") \ |
41 | 44 | 2>"$STEP_TMP_DIR/terraform_workspace_new.stderr" \ |
42 | 45 | >"$STEP_TMP_DIR/terraform_workspace_new.stdout" |
43 | 46 |
|
|
52 | 55 |
|
53 | 56 | if grep -Fq "already exists" "$STEP_TMP_DIR/terraform_workspace_new.stderr"; then |
54 | 57 | echo "Workspace does exist, selecting it" |
55 | | - (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace select -no-color "$INPUT_WORKSPACE") |
| 58 | + # shellcheck disable=SC2086 |
| 59 | + (cd "$INPUT_PATH" && $TOOL_COMMAND_NAME workspace select $VARIABLE_ARGS -no-color "$INPUT_WORKSPACE") |
56 | 60 | else |
57 | 61 | cat "$STEP_TMP_DIR/terraform_workspace_new.stderr" |
58 | 62 | cat "$STEP_TMP_DIR/terraform_workspace_new.stdout" |
|
0 commit comments