Chapter 9 of 10All chapters
Chapter 9 of 10
Infrastructure as code
Clicking is not repeatable.
The idea
Describe the infrastructure in files, keep them in version control, and apply them. The environment becomes reviewable, repeatable and destroyable without ceremony.
- Terraform and the providers' own tools all do this; the principle matters more than the choice.
- State files describe reality and must be stored where the team shares them safely.
Why it pays
Rebuilding an environment from scratch stops being a project and becomes a command. That is what makes staging environments and disaster recovery realistic.