What are the pros/cons of using Terragrunt versus Terraform Workspaces when instantiating modules? #92
-
What are the pros/cons of using Terragrunt versus Terraform Workspaces when instantiating modules? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Updated answer (Aug, 2022)I took the original answer below and flushed out the details in a blog post series called How to manage multiple environments with Terraform to answer this question. This series walks through how to use workspaces, branches, and Terragrunt to set up multiple environments, switch between environments, use different configurations, backends, and versions in each environment, and how to work with multiple modules. At the end of each post, you’ll see a list of the advantages and drawbacks of using that option. And for those of you looking for the short version, there's a handy comparison table in that series to help you pick: Original answer (Dec, 2021)There are a bunch of trade-offs. The short version is that workspaces are native to Terraform, so they are available out of the box and easy to use, but Terragrunt handles the separation you need between environments (minimizing "blast radius") better. Here is the more in-depth version: Advantages of workspaces vs Terragrunt
Drawbacks of workspaces vs Terragrunt
|
Beta Was this translation helpful? Give feedback.
Updated answer (Aug, 2022)
I took the original answer below and flushed out the details in a blog post series called How to manage multiple environments with Terraform to answer this question. This series walks through how to use workspaces, branches, and Terragrunt to set up multiple environments, switch between environments, use different configurations, backends, and versions in each environment, and how to work with multiple modules. At the end of each post, you’ll see a list of the advantages and drawbacks of using that option. And for those of you looking for the short version, there's a handy comparison table in that series to help you pick:
Original answer (Dec, 2021)
There are a…