Evolving Your Infrastructure with Terraform
summary
Starts from a single local Terraform file that uses a local TF state and accidentally deletes production when a backup rename confuses state, evolves through separate env state to reusable modules that compose a VPC, Kubernetes (1 master + 3 nodes) and RDS, then to nested modules and finally one-state-per-component (six state files) with remote S3 backend and locking. Shows the practical gotchas: a mistyped shared variable rebuilt Kubernetes, and Terraform cannot count modules so you must duplicate module blocks; recommends terra monolith → terra modules → remote S3 backend as the practical path and flags the bootstrap question around Consul/Vault.
AI-written summary · about
