Back

itnext.io

The Pains in Terraform Collaboration

Updated 3/31/2024
https://itnext.io/pains-in-terraform-collaboration-249a56b4534e?gi=f58fcedbde2e

The snags that may stall your Terraform adoption and what to do I divide Infrastructure as Code (IaC) into three categories. **Mark-up languages** like CloudFormation and ARM have simple format, but the body of code sprawls enormously with more objects lumped together. **Domain specific languages** such as Terraform’s HCL, feature flexible syntax and a mild dose of abstraction, creating a pleasant coding experience. Libraries that supports **general-purpose programming languages**, such as AWS CDK and Pulumi, are extremely powerful yet requiring serious programming proficiencies to tame the hyper-abstractions. … The open-source Terraform keeps states in workspaces. So we can address the first problem. However, workspace does not attempt to deal with the second and third problems. For that sake, I regard the workspace feature in open-source Terraform as half-baked. It misses too much. I have seen teams using variable files to store input per-workspace input variables. However, the input variables may contain secrets too. In addition, one more item to keep track over time, is whether each state remains consistent with the actual target resources (drift detection), which is also tricky. … There are many purpose-built extensions (GitHub, Azure DevOps) to facilitate Terraform installation and command invocation. However, as discussed, the real pain point with Terraform collaboration is the statefulness and consequent issues. Automation pipelines fall short in this regard, despite of its significant role in continuous integration in SDLC. Its scripting capability can virtually achieve any programmable task, but it is not fun to juggle with numerous code paths to deal with state logistics and stateful resources.

Related Pain Points3