Member-only story
Managing AWS resources in multiple environments with IaC
As a continuation to the last post, in this post we further discuss on the topic of managing multiple cloud environments (in AWS) using IaC (Terraform). Specifically, using the workspace feature of Terraform. Also, as described in this post, here, our focus will strictly be on the backend components of the architecture, and not the backend components supporting frontend.
Every sub-prod and prod environments have varied scaling requirements. When using Terraform, various strategies are employed to achieve the same. Most common strategy is to use separate tfvar files.
This specific aspect is not part of this post, and requires a separate discussion. It would also be heavily influenced by the choice of CI/CD tool being used to automate cloud architecture deployment.
Terraform is a cloud-agnostic IaC tool of our choice to manage our cloud resources in AWS. If you are unaware of it, I would highly recommend going through the booklet titled “ Terraform Tutorial — Basics”, which was written in collaboration with Spacelift. This free resource will help you get started with Terraform within a day.
So those who know how Terraform works, one question which is always asked is — how to effectively manage the state files. State files are the most critical piece of information which…