diff --git a/tfexec/cmd.go b/tfexec/cmd.go index 083dc4d5..5e160324 100644 --- a/tfexec/cmd.go +++ b/tfexec/cmd.go @@ -169,7 +169,7 @@ func (tf *Terraform) buildEnv(mergeEnv map[string]string) []string { env[automationEnvVar] = "1" // force usage of workspace methods for switching - env[workspaceEnvVar] = "" + delete(env, workspaceEnvVar) if tf.disablePluginTLS { env[disablePluginTLSEnvVar] = "1" diff --git a/tfexec/cmd_test.go b/tfexec/cmd_test.go index 5aa6fae6..c86dae30 100644 --- a/tfexec/cmd_test.go +++ b/tfexec/cmd_test.go @@ -46,7 +46,6 @@ func defaultEnv() []string { "TF_LOG_CORE=", "TF_LOG_PATH=", "TF_LOG_PROVIDER=", - "TF_WORKSPACE=", } }