Skip to content

Commit dace1c8

Browse files
Use a consistent env var for TF_WORKSPACE (#101)
This is just used in the test runner, but we may as well be consistent with the variable used in terraform and mainline tflint. As suggested here: #99 (comment) As per the docs here: https://www.terraform.io/docs/cli/config/environment-variables.html#tf_workspace
1 parent eb30218 commit dace1c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helper/runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (r *Runner) EvaluateExpr(expr hcl.Expression, ret interface{}, wantTy *cty.
188188
for _, variable := range r.tfconfig.Module.Variables {
189189
variables[variable.Name] = variable.Default
190190
}
191-
workspace, success := os.LookupEnv("TERRAFORM_WORKSPACE")
191+
workspace, success := os.LookupEnv("TF_WORKSPACE")
192192
if !success {
193193
workspace = "default"
194194
}

0 commit comments

Comments
 (0)