Infrastructure as Code
The IaC landscape, declarative vs imperative, and why state management is the hard part.
Overview
Infrastructure as software
Infrastructure as Code (IaC) treats provisioning as software: version-controlled, code-reviewed, deployed by automation. It has been the SRE standard since about 2015; the question now is which tool, not whether.
Every IaC tool runs the same loop. You keep declarative config in git. A plan diffs that code against the state, and a reviewer checks the diff in code review. Apply makes the change, the state file is updated, and the next plan starts from that state.
Key concepts
- Declarative IaC
- State file
- Plan / apply
- Remote state + locking
- OpenTofu fork
- Crossplane
Interview questions
- Compare Terraform, Pulumi, and Crossplane.
- Why is state management the hardest IaC problem?
- How do you organize Terraform code at scale?
Sign up free to read the full topic
More SRE topics
Start free on Cariara · Coding problems · System design studio