DevOps
Intermediate
What is Infrastructure Drift?
The divergence between the actual state of infrastructure and its defined desired state, caused by manual changes or untracked modifications.
Infrastructure drift occurs when someone makes manual changes to servers, cloud resources, or configurations that are not reflected in the Infrastructure as Code (IaC) definitions. This creates an inconsistency where the code no longer accurately represents reality. Drift causes unpredictable behavior, makes disaster recovery unreliable, and undermines the repeatability that IaC promises. Detection tools include terraform plan (shows differences), AWS Config (tracks resource changes), and drift detection features in CloudFormation. Prevention strategies include enforcing changes only through IaC pipelines, locking down manual console access, and running regular drift detection scans.