terraform workspace
Terraform workspaces allows to have multiple state files in the same working directory.
terraform workspace new MY_NEW_WORKSPACE
terraform workspace select
terraform workspace list
terraform workspace show
terraform workspace delete
terraform workspace --help
Cloud block example
terraform { cloud { organization = "my-org" workspaces { name = "my-workspace" } } }
Related terms
- Terraform Associate: Describe the benefits of Sentinel, registry, and workspaces
- Terraform backends
- State files
- terraform env (deprecated)
- Terraform cloud block
Multiple workspaces are currently supported by the following backends:
See also
Advertising: