Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the `workspaces not supported` message mean when running `terraform workspace list`?

I have main.tf:

terraform {
  backend "remote" {
    organization = "myorg"

    workspaces {
      name = "some-workspace-like-so"
    }
  }
}

Ran terraform init successfully. However if I then run terraform workspace list to see other workspaces in my organization I get the error workspaces not supported. Is this an org setting, a configuration issue, me misunderstanding how the command is supposed to work, something else?

like image 798
dazeddandconfused Avatar asked Oct 27 '25 08:10

dazeddandconfused


1 Answers

Try using the workspaces block's prefix parameter rather than its name argument to handle the several TFC workplaces.

terraform {
  backend "remote" {
    hostname = "app.terraform.io"
    organization = "org"

    workspaces {
      prefix = "my-infra"
    }
  }
}

Reference: https://github.com/hashicorp/terraform/issues/22802 by saitotqr

like image 121
Imran Avatar answered Oct 29 '25 05:10

Imran