1.Reproducible and Reviewable Infrastructure
Infrastructure as code means the definition of your infrastructure lives in version control, and changes reach production by changing that definition. Two properties follow. Reproducible: you can rebuild the environment from the file, in another Region or another account. Reviewable: a change is a diff someone can read before it happens, not an action someone took in a console.
Key features
- The artifact is the code, not the running resource — a resource changed by hand no longer matches its definition, which is drift
- Reproducibility is what makes a second environment cheap: staging is the same template with different parameters, not a hand-rebuilt copy
- Reviewability moves the safety check before the change: a diff and a change set are read while the production resource is still untouched
- CloudFormation compares the modified template against the original and generates a change set listing the proposed changes
- A change set does not tell you the update will succeed — it will not catch a quota you are about to exceed, an unsupported update, or missing permissions
- IaC also produces an audit trail for free: who proposed the change, who approved it, and what exactly it altered are all in the version history
- Console change
- Reviewed after the fact, if at all
- Reproducible only from memory
- Rollback means remembering the old value
- Environments drift apart silently
- Infrastructure as code
- Reviewed as a diff before it applies
- Rebuildable in another account or Region
- Rollback is reverting a commit
- Drift is detectable, because there is a definition to compare against
Signature
definition in version control → reviewed diff → applied → reality matches definition (else: drift)
Infrastructure as code buys two things: reproducibility (rebuild it elsewhere from the file) and reviewability (read the diff before it applies). Both depend on the code being the only path to production — otherwise the definition drifts into fiction.