DELAPARRA
Index
Color
NL
Category: Terraform

drift

Explained by Updated

What is drift?

drift: When real infrastructure no longer matches state — someone changed it in the console. A plan reveals drift as proposed changes. Drift is the difference between what Terraform thinks your infrastructure looks like and what actually exists. It happens when someone changes a resource by hand, for example in the cloud console during an incident.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about drift

How is drift used in practice?

The next terraform plan shows those manual changes as differences. If you apply without thinking, Terraform will undo the manual fix, which may bring back the problem it solved.

What should you keep in mind with drift?

Run terraform plan -refresh-only to see drift without proposing changes. Then decide whether to copy the manual change into your code, or let Terraform restore the defined state. Prevent drift by limiting who can change production by hand, and by running plans regularly in CI to catch it early. Infrastructure as code only works as well as the habit of changing things through code.

What does an example of drift look like?

terraform plan -refresh-only

At a glance

CategoryTerraform
Explained by
Updated

More Terraform terms

All terms starting with D

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.