Brains4Cloud
ESEN

Terraform

Terraform Workspace

Separate state instances within the same configuration. Lets you manage multiple environments (dev, staging, prod) with the same codebase. Each workspace has its own tfstate file.

On the exam

In Terraform Associate: terraform workspace new dev creates a workspace. The default workspace is called "default". It's an alternative to having separate directories per environment, though modules + directories are preferred for complex configurations.

Related terms

More Terraform terms

See the whole glossary →