Infrastructure as Code (IaC) drift detection is the only way to catch changes that slip past your Git history. Manual updates in the console, emergency fixes, or old pipelines can all create configuration states that no longer match your IaC. Without continuous detection, you run infrastructure that you think you control—but don’t.
Chaos testing exposes the cost of this blindness. By intentionally creating controlled drift, you see how detection systems respond. This isn’t theory; it’s about measuring the exact time from unauthorized change to alert, and proving that your pipelines can converge back to the desired state without introducing regressions.
Effective IaC drift detection starts with deep integration at the cloud provider API level. Polling state is not enough; you need event-driven triggers that catch changes as they happen. Compare real-time state against the committed IaC spec, flag mismatches, and log all variance. The faster you surface these mismatches, the smaller the blast radius.
Chaos testing pushes drift detection beyond happy-path assumptions. Simulate IAM policy edits, security group changes, autoscaling tweaks, and resource deletions. Randomize the drift injection patterns to mimic unpredictable human and system behavior. Track how your detection system prioritizes noise versus critical incidents.