Opening Scene
If someone manually alters a brick or a fixture on a construction site, working around the official blueprint rather than through it, the building itself quietly stops matching its own record of what it’s supposed to be. Left unnoticed, this divergence compounds over time, until the blueprint and the actual building bear less and less resemblance to each other. Drift detection in infrastructure as code catches this exact same divergence in cloud infrastructure.
In Plain English
Configuration drift occurs when actual infrastructure is modified outside of the IaC tool — through a manual console change, for instance — causing the real, current state to diverge from what the tool’s state and configuration files describe. Drift detection actively compares actual infrastructure against the expected, defined configuration, flagging any divergence before it compounds or causes unexpected behavior during a future infrastructure change.
The Old Way
Before drift detection was a well-established, deliberately practiced discipline, this kind of divergence often went unnoticed:
- Manual, out-of-band changes to infrastructure sometimes went unnoticed for extended periods, since nothing was actively comparing actual state against defined configuration.
- There wasn’t yet a well-established practice of running regular, automated checks specifically to detect this kind of unauthorized or unintentional divergence.
- Drift, once accumulated, sometimes caused confusing, difficult-to-diagnose problems the next time an infrastructure change was actually applied through the IaC tool.
Undetected configuration drift, without regular, automated checking, is what disciplined drift detection practice directly addresses.
What’s Changing (and Why AI Is the Reason)
- Organizations increasingly run regular, automated drift detection checks, flagging divergence between actual infrastructure and defined configuration before it compounds.
- This connects directly to the state management practices covered in Article 7, since drift detection depends entirely on accurate, trustworthy state as its baseline for comparison.
- As organizations increasingly restrict manual console access in favor of IaC-only changes, drift detection has become an important complementary safeguard specifically for catching any exceptions or emergency manual changes that still occur.
The Metaphor, Fully Extended
| The Brick Mold | Infrastructure as Code Concept |
|---|---|
| A brick manually altered, working around the official blueprint | Infrastructure manually modified outside the IaC tool |
| The building quietly no longer matching its own record | The actual infrastructure state quietly diverging from defined configuration |
| Divergence compounding over time if left unnoticed | Drift compounding over time without regular detection |
| Actively comparing the building against the blueprint | Actively comparing actual infrastructure against defined configuration |
For Beginners: What to Actually Do
- Practice imagining what could go wrong if infrastructure is manually changed outside an IaC tool without anyone noticing.
- Learn the basic concept of configuration drift and why it tends to compound if left undetected.
- Get comfortable with the idea that regular, automated checking is necessary to catch drift before it causes real problems.
For Practitioners and Leaders: The Deeper Layer
- Run regular, automated drift detection checks across your organization’s IaC-managed infrastructure.
- Investigate and resolve detected drift promptly, understanding whether it reflects an intentional exception or an unintentional, unauthorized change.
- Restrict manual console access where practical, using drift detection as a complementary safeguard for any exceptions that still occur.
Quick Recap
- Configuration drift occurs when actual infrastructure diverges from its defined configuration through out-of-band changes.
- Drift detection actively compares actual state against expected configuration, flagging divergence.
- Undetected drift compounds over time and can cause confusing problems during future infrastructure changes.
- Drift detection remains an important safeguard even as organizations restrict manual infrastructure changes.
Where This Fits in the Series
Article 8 covered catching divergence between actual and defined infrastructure. Article 9 turns to a related practice for reducing that risk in the first place: a standard wall module, reused everywhere.
Subscribe to the Newsletter
Get the latest DataParables articles delivered straight to your inbox.