From the course: Learning Terraform

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Deploying environments

Deploying environments - Terraform Tutorial

From the course: Learning Terraform

Deploying environments

- [Instructor] Now that our code is modular, it's trivially easy to deploy another environment. So in Terraform, we can go back to our workspaces. HashiCorp recommends creating additional workspaces for each environment of a given configuration. So our blog app needs a different workspace for each environment. So we can go to New workspace from our Terraform Cloud console. We can just follow the same process that we used at the beginning of the course. So we'll choose VCS, GitHub, and we'll use the same repository. Learning Terraform. Of course, we'll want to rename our workspace. And this time, let's call it blog-qa. We want to open up advanced options because we'll need to set our working directory, qa. The rest we should be able to leave the same. You can create some triggers here if you like and filter based on only when files are changed in a particular path. So we could say only if modules or qa is changed but I'm not going to bother with that. And that should be all we need. We…

Contents