Course contentsShow
← Security
Lesson 2022 of 3,05240. Cloud Security - Compliance and GovernanceFree lesson

Infrastructure Drift: Causes and Risks

Understanding how cloud infrastructure diverges from desired state and the security implications of uncontrolled drift.

Infrastructure Drift: Causes and Risks

What you'll learn: You'll understand why cloud infrastructure diverges from its intended state and the security implications of this uncontrolled drift.

What is Infrastructure Drift?

Infrastructure drift occurs when your actual deployed resources deviate from the desired state defined in your Infrastructure as Code (IaC). Think of it like a recipe: your IaC is the recipe, but drift happens when someone manually adds ingredients to the dish after it's been served, or when environmental factors change the final result without updating the recipe.

Common Causes of Drift

Manual Changes: Engineers make emergency fixes directly in the cloud console or CLI, bypassing IaC workflows. That quick security group rule adjustment? It's now undocumented drift.

Out-of-Band Updates: Automated processes, scripts, or third-party tools modify resources without updating the IaC source.

Provider Changes: Cloud platforms deprecate services, change default settings, or modify resource behavior—your IaC stays static while reality shifts.

Concurrent Modifications: Multiple team members or pipelines modify the same resources without coordination.

Security Risks of Drift

Configuration Vulnerabilities: A manually opened port or disabled encryption setting creates an attack surface invisible to your IaC security scans and policy checks.

Compliance Violations: Drifted resources may fail audit requirements because they no longer match documented, approved configurations.

Incident Response Blindness: When investigating breaches, drift makes it impossible to know what the "correct" configuration should be.

Remediation Failures: Automated fixes may unknowingly overwrite legitimate manual changes, or worse, legitimate IaC deployments may overwrite critical manual security patches.

Loss of Audit Trail: Manual changes often lack proper logging or approval workflows, breaking your compliance evidence chain.

Key Takeaway: Infrastructure drift transforms your documented security posture into fiction—manual changes bypass IaC security controls, create undocumented vulnerabilities, and make your actual attack surface invisible to compliance tools and security teams.