What is drift detection in Terraform?
⚡
Quick Answer
Drift is when real infrastructure diverges from what Terraform state/config expects — usually from manual console changes. Detection is running terraform plan (or refresh) to surface the differences.
Detailed Answer
terraform plan compares desired config, state, and the actual cloud resources, showing out-of-band changes as a diff. Teams schedule drift checks in CI and alert on unexpected changes, then either import/codify legitimate changes or re-apply to correct them. GitOps-style continuous reconciliation prevents drift from persisting.
💡
Interview Tip
Say drift usually comes from manual changes and that scheduled plan runs (or continuous reconciliation) catch it.
terraformdriftiac