I am using Terraform cloud with workspace === staging
I am using this line in one of my tf files:
name = “${terraform.workspace}-mongodb”
When the plan is triggered i have “default-mongodb” instead of “staging-mongodb”
When i use TF_WORKSPACE == “staging” as ENV VAR in the terraform cloud console i have an error: “Error loading state: workspaces not supported”
Hi,
Did you ever resolve this?
I’m getting similar:
running "/usr/bin/terraform init -input=false -upgrade -backend-config=development.tfbackend" in "/root/repos/my-repo-name": exit status 1
Initializing the backend...
Error loading state: workspaces not supported
EDIT: above doesn’t work for me now, although it used to do
As I want to specify different Terraform Workspaces in my deployment (difference being between a prod and dev version) I can’t have the workspace hardcoded.
Can anyone suggest a fix?