-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Original init command works if we add TF_WORKSPACE env var, but apply for some reason runs init again, but explicitly unsets TF_WORKSPACE, resulting in a error:
export workspace
unset TF_WORKSPACE
...
terraform init -input=false -no-color $INIT_ARGS "$module_path"
terraform workspace select -no-color "$workspace" "$module_path" || terraform workspace new -no-color "$workspace" "$module_path"
terraform apply -auto-approve $PLAN_ARGS "$module_path"
Initializing modules...
Initializing the backend...
The currently selected workspace (default) does not exist.
This is expected behavior when the selected workspace did not have an
existing non-empty state. Please enter a number to select a workspace:
1. test-ci
Enter a value:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels