The Terraform plan looked clean. The pull request was approved. The pipeline was green. And yet, production wasn’t what the code said it should be.
That’s drift. Infrastructure as Code promised us a single source of truth, but the truth can shift under your feet. Manual changes, hidden dependencies, forgotten experiments—drift creeps in quietly. It breaks trust in your IaC and exposes you to risk. The code stops matching reality. That’s where risk-based access meets drift detection.
Traditional drift detection runs on a fixed schedule or before deployments. It flags mismatches but treats every drift the same. That’s not enough. Some drift is harmless. Some drift is catastrophic. Treating them equally increases noise and slows teams down. Risk-based access changes this. It looks at context—who is making the change, what system is touched, when it happens, and how it affects critical paths. It lets you decide when to grant or block access based on the actual risk, not just the presence of drift.
Risk-based access for IaC drift detection works best when it’s continuous and automated. The process starts by tracking your live infrastructure state in real time. It compares that state against your declared configuration in IaC. When drift appears, it doesn’t just log the delta—it scores the impact. Updating a low-sensitivity dev sandbox might just trigger a review, while altering a core payment service in production could lock access instantly. The rules and thresholds come from your own security model, mapped to business impact.