Workspaces Intro

View saved

Default workspace

Every backend starts with a default workspace.

terraform workspace show
terraform workspace list

Create and switch

Handy for isolated local experiments with the same code.

terraform workspace new practice
terraform workspace select default

What workspaces are not

They are not a full environment strategy by themselves. Many teams prefer separate folders or separate state backends for staging vs production.

Name resources carefully

If two workspaces would create the same hard-coded cloud name, they collide. Parameterize names with variables.

Comments

One comment per signed-in account. Comments are saved with this page’s URL.