Course contentsShow
← Software Engineering
Lesson 1474 of 1,93343. Infrastructure as CodeFree lesson

Configuration Drift and Its Problems

How manual changes and updates lead to configuration drift, making systems unpredictable and difficult to reproduce.

Configuration Drift and Its Problems

What you'll learn: How manual changes to production systems create inconsistencies that make your infrastructure unpredictable and impossible to reliably reproduce.

What Is Configuration Drift?

Configuration drift occurs when the actual state of your infrastructure diverges from its documented or intended state. This happens when engineers make manual changes directly to servers—installing packages, tweaking settings, applying hotfixes—without updating the infrastructure code that originally provisioned them.

Think of it like a recipe that says "bake at 350°F for 30 minutes," but different cooks keep adjusting temperatures and times without updating the recipe card. Eventually, no one knows the "real" recipe anymore, and results become unpredictable.

Why Drift Is Dangerous

Once drift sets in, you lose the core benefits of Infrastructure as Code:

Unpredictability: Server A and Server B were provisioned identically, but manual tweaks mean they now behave differently. Bugs appear on one but not the other, and you can't explain why.

Loss of Reproducibility: You can't recreate your production environment for testing or disaster recovery. Your infrastructure code no longer reflects reality.

Increased Risk: Rolling back changes becomes dangerous because you don't know what the "working" state actually was. Did that manual fix prevent an outage, or can you safely remove it?

Knowledge Silos: Critical configuration exists only in someone's head or in undocumented SSH sessions.

The IaC Solution

Immutable infrastructure and declarative IaC tools prevent drift by making manual changes either impossible or immediately obvious. Every change goes through code review and version control, maintaining a single source of truth.

Key Takeaway: Configuration drift—the divergence between documented and actual system state caused by manual changes—destroys reproducibility and makes infrastructure unpredictable, which is precisely what Infrastructure as Code aims to prevent.