Creating Workspaces
Learn when and how to create a workspace in Terraform.
What is a workspace in Terraform?
A workspace in Terraform Cloud and Terraform open-source mean two slightly different things. For the certification, we’re focusing on the Terraform open-source option. Workspaces in Terraform open-source are independently managed state files that share a common configuration.
Note: In older versions of Terraform, a similar construct called an environment was managed using the
terraform env
command. That command still exists, but it’s essentially an alias forterraform workspace
and may be deprecated in a future release.
Workspace for multiple environments
Many organizations have multiple environments, including development, testing, staging, and production. Each Terraform workspace is ...