Terraform At Scale
summary
Segment runs Terraform for about a year to manage ~100 microservices and several thousand AWS resources across 25 engineers with 16 active infra contributors, moving from hand-baked AMIs and a monolithic git-tracked state to per-service remote state on S3, Docker + ECS for services, and a packer-built AMI supervised by systemd. Problems include merge conflicts from local state, environment drift solved by modules everywhere, and lack of apply locking — fixes are versioned module refs, CI-driven plans, and exploring Atlas for locking and remote applies.
AI-written summary · about
