← Terraform & Infrastructure as Code

Drift Detection

Detect and remediate configuration drift between Terraform state and actual infrastructure.

Drift Detection diagram

Drift detection workflow with import and remediation options

Configuration drift occurs when infrastructure is modified outside of Terraform. Regular drift detection helps maintain consistency and compliance.

Drift management approach:

  • Scheduled Plans - Regular terraform plan to detect changes
  • Import Process - Bring manual changes under Terraform management
  • Alerting - Notify teams when drift is detected
  • Remediation - Either update Terraform or reapply configuration

Key Concepts

  • Run drift detection daily or on schedule
  • Document approved exceptions
  • Use terraform refresh cautiously
  • Import existing resources before managing
  • Track drift metrics over time

Need Help with AWS Architecture?

Book a free consultation to discuss your cloud infrastructure needs.

Schedule a Call