Misadventures with Terraform
summary
Started with Terraform v0.6 and hits include missing backend locking and import features, S3 statefiles that get big and slow, and a nasty cyclic dependency between two services that prevents rebuilding from scratch; solution: remove direct coupling by adding a third stitching state, run full end-to-end deployment tests in a dedicated infrastructure account, and refactor states by team/environment to shrink blast radius and remove a centralized gatekeeper. Recommends one module per repo, uses Terragrunt and Atlantis to fill Terraform gaps and improve CI review and orchestration.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:41What is Terraform?
- 2:50Terraform Modules
- 3:22Terraform Statefile
- 3:57Terraform Plan
- 4:41Terraform Apply
- 5:59In the beginning...
- 6:21A few years ago...
- 8:47Monolith Terraform State
- 8:59Reusable Modules
- 9:39Single Resource Modules
- 10:13Complex Deployment
- 11:11Lessons Learned (small modules)
- 13:16Two Connected Services
- 13:33A Service On FIRE!
- 15:26Lessons Learned running code ance
- 17:09Terraform States and Modules
- 20:54Lessons Learned dividing states
- 22:54Terraform backend.tf
- 23:41Terraform Code Repo
- 28:18Terragrunt Code Repo
- 28:48Lessons Learned (repo structures)
- 29:32Additional Resources
related talks
41mTerraform Practices - The Good, the Bad, and the Ugly
31mTerraform Practices to Enable Infrastructure Scaling
35mTerraform Practices - The Good, the Bad and the Ugly
15mTerraform Practices: The Good, the Bad, and the Ugly
30mTerraform in Depth QA and Fireside Chat
01h 00mGotchas using Terraform in a secure delivery pipeline
39mTerraform Practices to Enable Infrastructure Scaling
05mWAT.tf
