diff --git a/internal/command/workspace_delete.go b/internal/command/workspace_delete.go index 013db3966c..973fd709da 100644 --- a/internal/command/workspace_delete.go +++ b/internal/command/workspace_delete.go @@ -210,7 +210,7 @@ Usage: terraform [global options] workspace delete [OPTIONS] NAME Options: - -force Remove even a non-empty workspace. + -force Remove even a workspace with resources under management. -lock=false Don't hold a state lock during the operation. This is dangerous if others might concurrently run commands diff --git a/website/docs/cli/commands/workspace/delete.mdx b/website/docs/cli/commands/workspace/delete.mdx index cadfa6459e..1fb9b1a679 100644 --- a/website/docs/cli/commands/workspace/delete.mdx +++ b/website/docs/cli/commands/workspace/delete.mdx @@ -13,20 +13,25 @@ Usage: `terraform workspace delete [OPTIONS] NAME [DIR]` This command will delete the specified workspace. -To delete an workspace, it must already exist, it must have an empty state, -and it must not be your current workspace. If the workspace state is not empty, +To delete a workspace, it must already exist, it must not have resources under management, +and it must not be your current workspace. If the workspace has resources under management, Terraform will not allow you to delete it unless the `-force` flag is specified. -If you delete a workspace with a non-empty state (via `-force`), then resources +Workspaces with resources under management (RUM) are workspaces which manage resources that physically exist. +This means that the workspace has a non-empty state. +Additionally, different [backends](/language/settings/backends/configuration#backend-types) may implement other +restrictions on whether a workspace is considered to have RUM, such as whether the workspace is locked. + +If you delete a workspace with resources under management (via `-force`), then resources may become "dangling". These are resources that physically exist but that -Terraform can no longer manage. This is sometimes preferred: you want -Terraform to stop managing resources so they can be managed some other way. +Terraform can no longer manage. This is sometimes preferred: you may want +Terraform to stop managing resources, so they can be managed some other way. Most of the time, however, this is not intended and so Terraform protects you from getting into this situation. -The command-line flags are all optional. The only supported flag is: +The command-line flags are all optional. The only supported flags are: -* `-force` - Delete the workspace even if its state is not empty. Defaults to false. +* `-force` - Delete the workspace even if it has resources under management. Defaults to false. * `-lock=false` - Don't hold a state lock during the operation. This is dangerous if others might concurrently run commands against the same workspace.