The Terraform plan shows clean. The infrastructure looks solid. But deep in the cloud, something has changed. This is drift.
Infrastructure as Code (IaC) drift occurs when the actual state of your cloud resources no longer matches the state defined in your code. A new security group rule added in the console. An instance resized manually. A forgotten DNS change. Each shift is invisible until you look for it, and by then it can break deployments, cause downtime, or open security holes.
An IaC drift detection proof of concept (POC) is the fastest way to test how well a process can find and report these changes. A good POC answers three questions:
- What resources are being monitored? Each cloud provider offers APIs to list current infrastructure. Your POC should query those APIs directly.
- How is the desired state defined? Use your Terraform code, CloudFormation templates, or Pulumi configs as the single source of truth.
- How are differences flagged? Run a comparison between the live state and the code state. Output needs to be specific — resource ID, property, time of change.
To build the IaC drift detection POC, start by exporting the current state from your infrastructure tool. Then pull the actual state from the cloud provider’s API. Normalize both data sets to the same format, then run a diff. Automate and schedule this process so it runs daily.