skip to content
Alvin Lucillo

Terraform workspaces

/ 1 min read

💻 Tech

Terraform workspace can help you organize your project, so that each context like environment can have its own state. This works with maintaining configuration across different environments. By default, an initialized work directory uses the default workspace. Some of the Terraform commands to manage workspaces:

  1. terraform workspace new <workspace-name> - create a new workspace
  2. terraform workspace show - show the name of the current workspace
  3. terraform workspace select <workspace-name> - switch to another workspace