Terraform workspace

A workspace in Terraform creates many instances of Terraform code using a single project. One of the advantages of Terraform is that you can use the infrastructure as code to create your environments, reducing human error and ensuring uniformity.

You may have wondered how to create multiple environments using the same code. Everything we have done up until this point has been around creating a single instance of the infrastructure using our Terraform project, after all. If we rerun the project, it would not create another copy of the infrastructure, but would instead simply say “no changes to make”.

Get hands-on with 1400+ tech skills courses.