Terraform Error: Workspace is not emptyTerraform Error:

Error

terraform workspace delete qa
╷
│ Error: Workspace is not empty
│
│ Workspace "qa" is currently tracking the following resource instances:
│   - aws_instance.example-number[0]
│
│ Deleting this workspace would cause Terraform to lose track of any associated remote objects, which would then
│ require you to delete them manually outside of Terraform. You should destroy these objects with Terraform before
│ deleting the workspace.
│
│ If you want to delete this workspace anyway, and have Terraform forget about these managed objects, use the -force
│ option to disable this safety check.

Solution


terraform workspace select default
terraform workspace delete qa [ ERROR ] 
terraform workspace select qa
terraform destroy --auto-approve
terraform workspace select default
terraform workspace delete qa
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x