# Terraform Workspace

> A Terraform workspace is a named state inside the same backend and configuration, used to create several copies of an infrastructure.

- Source: https://www.itwonderlab.com/terraform-workspace/
- Published: 2026-07-02
- Updated: 2026-07-02
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

A **Terraform workspace** is a named instance of the [state](https://www.itwonderlab.com/terraform-state/) inside one [backend](https://www.itwonderlab.com/terraform-backend/). A new configuration starts in the workspace `default`. Create more with `terraform workspace new dev`, switch with `terraform workspace select`, and read the current one in code with `terraform.workspace`.

Workspaces share the same code, backend and provider credentials, so they are good for temporary copies of an environment but a weak boundary between development and production. HCP Terraform uses the same word for a different concept.

Compare the options in [workspaces vs directories](https://www.itwonderlab.com/terraform-workspaces-vs-directories/).
