A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/cli/commands/workspace/delete below:

terraform workspace delete command reference | Terraform

terraform workspace delete command

The terraform workspace delete command deletes the specified workspace.

Usage: terraform workspace delete [OPTIONS] NAME [DIR]

This command will delete the specified workspace.

To delete a workspace, it must already exist, it must not be tracking resources, and it must not be your current workspace. If the workspace is tracking resources, Terraform will not allow you to delete it unless the -force flag is specified.

Additionally, different backends may implement other restrictions on whether a workspace is considered safe to delete without the -force flag, such as whether the workspace is locked.

If you delete a workspace which is tracking resources (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 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 flags are:

$ terraform workspace delete example
Deleted workspace "example".

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4