Change Management and Planning
What you'll learn: How to preview infrastructure changes safely before applying them to production environments.
Why Preview Matters
Imagine remodeling your kitchen without knowing which walls are load-bearing. In infrastructure, making changes without understanding their impact can be equally catastrophic. Change management and planning in Infrastructure as Code means always knowing what will happen before you make changes to real systems.
The Plan Command Concept
Most IaC tools offer a "plan" or "preview" command that shows you exactly what resources will be created, modified, or deleted—without actually touching your infrastructure. Think of it as a detailed blueprint review before construction begins.
When you run a plan command:
- It compares your code (desired state) against your state file (current state)
- It identifies differences and calculates necessary changes
- It shows you an execution plan: additions (+), modifications (~), and deletions (-)
- It catches configuration errors before they break production
The Safe Change Workflow
- Write or modify your infrastructure code
- Run the plan command to preview changes
- Review the output carefully with your team
- Apply changes only after validation
This workflow prevents surprises like accidentally deleting a database or exposing security groups to the internet. The plan output becomes your change request documentation, enabling peer review and approval processes before any actual provisioning occurs.
Building Confidence
Running plans frequently—even when you think nothing changed—helps detect drift (manual changes made outside IaC) and validates that your understanding matches reality. It's your safety net.
Key Takeaway: Always use plan commands to preview infrastructure changes before applying them; this practice prevents costly mistakes and enables collaborative review of proposed modifications.