Ad · 728×90 desktop · 320×50 mobile

Why your Terraform plan has drift (and how to stop it)

Published 2026-04-24 · Datacenter Operations

Every Terraform user has seen it: terraform plan shows changes you didn't make. Here's why, and how to make it stop.

Sources of drift

1. Manual changes via console

Someone clicked a button. The state file doesn't know. Next plan wants to revert.

2. Auto-scaling or lifecycle changes

ASG scaled up. Terraform's stored count doesn't match. Plan wants to undo.

3. Provider version differences

Last apply used provider 3.2. This plan uses 3.4. Schema changed, values differ.

4. External tool changes

A monitoring tool modified a tag. A security tool added a policy. Plan wants to remove it.

The fixes

1. Ban console changes

Not a policy ("please don't"). An actual ban (IAM denies console write actions). Even admins go through Terraform.

2. Use lifecycle rules

ignore_changes = [desired_capacity, tags["MonitoringAgent"]] — explicit opt-out for things that should drift.

3. Pin provider versions

In every module. In every root.

4. Integrate with external tools

If a security tool adds tags, tag them in Terraform too.

The cultural shift

The real fix is cultural: "everything goes through IaC, nothing via console." That takes 6-12 months to enforce. Once enforced, drift drops to near-zero.

Tools

Ad · 300×250 responsive

Joined by engineers at enterprises running the systems you build. No spam. No tracking in the emails.