Hi ,
I am currently testing terraform 0.12.3 on the Enterprise version of Terraform. As part of this I am trying to delete the workspace with existing resource present ( in the state file ). As per the below documentation
https://www.terraform.io/docs/commands/workspace/delete.html
Workspace can't be deleted if any existing state present in the workspace. Unless specifying "-force" parameter to delete the workspace.
When i am trying to delete the workspace from the terraform enterprise UI with the resources present in the state file. Without any warning it deletes the workspace.
Terraform v0.12.3
https://www.terraform.io/docs/commands/workspace/delete.html
...
It shouldn't delete the workspace
It Deletes the workspace
Please list the full steps required to reproduce the issue, for example:
1) terraform apply
2) terraform state list
3) Try to delete the workspace
Hi @keerthivassan86!
I just want to clarify to make sure I understand what you're reporting: it sounds like you are deleting a workspace through the Terraform Cloud or Terraform Enterprise web UI and were surprised to find that it doesn't have the same precondition that the terraform workspace delete CLI command has. Is that correct?
(I just want to make sure that we label this correctly so that the appropriate team can find it, since Terraform Cloud & Enterprise are maintained by different teams than Terraform CLI.)
@apparentlymart
Yes right, I tried to delete the workspace via terraform Enterprise Web UI . If i configured the Terraform enterprise with backend as remote, it is not supporting the workspace option, getting below message
workspaces not supported
We got the same errors when running terraform workspace select qa1 after setup the remote execution in terraform cloud.
workspaces not supported
without setting the TF_WORKSPACE env var, tf plan works but the value of terraform.workspace is default for all workspaces. This is really a BIG BREAKING CHANGE when moving to Terraform Cloud.
Hi again! Thanks for reporting this and sorry for the lack of further progress.
We use issues in this repository to represent bugs and feature requests in Terraform CLI. Terraform Cloud is developed by other teams who don't typically monitor this repository, and so this issue has unfortunately ended up stalled. The Terraform Cloud teams prefer to hear about bug reports and feature requests via the customer support system.
If you have a paid account on Terraform Cloud, please send this feedback to your usual support contacts. Otherwise, you can contact the Terraform Cloud support team at [email protected]. If you contact the support team, be sure to include your Terraform Cloud username and organization name in your request.
Because the change being discussed here would need to be implemented in the Terraform Cloud codebases rather than in this repository, I'm going to close this issue. Thanks again!
Most helpful comment
We got the same errors when running
terraform workspace select qa1after setup the remote execution in terraform cloud.workspaces not supportedwithout setting the
TF_WORKSPACEenv var,tf planworks but the value ofterraform.workspaceisdefaultfor all workspaces. This is really a BIG BREAKING CHANGE when moving to Terraform Cloud.