configuration drift
The slow, unrecorded way machines end up with different versions and settings from each other.
In more detail
Drift happens when people change machines by hand, updates land unevenly, or settings are copied imperfectly, so after a while no two machines match and nobody can say what one contains. Describing machines in version-controlled files and reapplying that description regularly both prevents drift and reveals it.
Examples
Running the same playbook hourly finds drift: a task that suddenly reports changed on one host marks a machine somebody edited by hand.Repeated manual repair of the same drift is toil. A GitOps controller reports drift between desired and observed state, separately from application health.A console hotfix changes a security group; the next terraform plan shows the differenceDrift makes baselines stale, so validators start failing healthy hosts or passing changed ones.In Terraform, drift means real infrastructure has been changed outside Terraform, so it no longer matches state and configuration. The refresh at the start of each plan detects it; you then either change the configuration to accept it or apply to put things back. Copying a directory per environment is another source of drift, which is why variables exist.Related terms
- configuration management — Keeping the software, settings, files and services on your machines in a known, described state, and putting them back when they wander from it.
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
- play recap — The summary at the end of a playbook run with one line per host counting tasks that were ok, changed, unreachable, failed, skipped, rescued and ignored.
- desired state — A description of how a machine should look when the work is finished, rather than a list of steps to get there.
- reconciliation — The repeated check-and-fix loop in which a program compares desired state with observed state and changes the world to match.
- toil — Manual, repetitive, automatable operational work that grows with the service and leaves no lasting value.
- out of sync — Argo CD's status for an Application whose live resources differ from the desired state in Git.
- self heal — An Argo CD option that re-applies the desired state when someone changes a live resource by hand.
- container — A running program that has been fenced off from the rest of the computer so it only sees its own files, network and processes.
- image — A read-only package containing a program and everything it needs to run, used as the template for containers.
- reproducible build — A build that produces the same result every time from the same inputs.
- baseline — A recorded picture of what normal looks like, used as the reference for spotting changes.
- technical debt — The future cost of shortcuts and neglected upkeep in systems, which grows until someone pays it down.
- lockfile — A file that records the exact version of every dependency, including transitive ones, so every install gets the same set.
- dynamic application security testing — Testing a running service for security problems by sending it crafted requests and observing the responses and state changes.
- refresh — Terraform asking each provider what the resources recorded in state really look like now, before it plans.
- refresh-only plan — A Terraform plan mode that reads the real resources and shows how they differ from state, without proposing to change them.
Related guides
- How to prepare for the Terraform Associate (004) exam
- Terraform state explained: the file, backends and locking
Taught in
- What Configuration Management Is — Ansible Configuration Management at Scale
- Environment Specific Configuration — Ansible Configuration Management at Scale
- Two Hundred Accounts And One Bad Deploy — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- CloudFormation In Depth: Replace Or Update? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- StackSets: Eighty Failures Before Lunch — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Systems Manager At Fleet Scale: Compliant And Unpatched — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Finding The Problem: The Composite Alarm That Stayed Quiet — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Remediation As Code: A Public Bucket Appears — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Troubleshooting Failed Deployments: Read The First Failure — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Long-Stem Clinic: When Two Answers Both Work — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- Drift Detection and Self-Healing — Continuous Integration & Continuous Delivery Pipelines
- Two Domain Controllers, One Host: Virtualisation — CompTIA Cloud+ (CV0-004) Exam Prep
- Two Environments That Should Have Been Twins — CompTIA Cloud+ (CV0-004) Exam Prep
- Deployment Sprint: A Plan That Deletes The App Server — CompTIA Cloud+ (CV0-004) Exam Prep
- Sixty Six Of Eighty Five: The Mock And Its Report — CompTIA Cloud+ (CV0-004) Exam Prep
- Security Landing Zones & Centralized Egress Inspection — Cloud Security & DevSecOps Engineering
- Software Composition Analysis with Trivy — Cloud Security & DevSecOps Engineering
- Runtime Anomaly Detection with Falco & eBPF — Cloud Security & DevSecOps Engineering
- Policy-as-Code Architecture: OPA & Rego Syntax — Cloud Security & DevSecOps Engineering
- Continuous IaC Drift Detection & State Protection — Cloud Security & DevSecOps Engineering
- Cloud Security Posture Management & Remediation — Cloud Security & DevSecOps Engineering
- Security Baselines, Policies & Hardening Standards — Cybersecurity Fundamentals, GRC & Cryptography
- Public Key Infrastructure: X.509 Certificates & CAs — Cybersecurity Fundamentals, GRC & Cryptography
- Enterprise Risk Registers & Treatment Plans — Cybersecurity Fundamentals, GRC & Cryptography
- Developer Toil And Cognitive Load — DevOps & Site Reliability Engineering
- Infrastructure As Code Context — DevOps & Site Reliability Engineering
- Pipelines And GitOps Context — DevOps & Site Reliability Engineering
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Bootstrap A Local Cluster And Check Your Context — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: A Timed Service Recovery Drill — Kubernetes: Production-Grade Container Orchestration
- Kustomize Base And Dev And Prod Overlays — Kubernetes: Production-Grade Container Orchestration
- Argo CD Applications And Flux Reconciliation — Kubernetes: Production-Grade Container Orchestration
- A Tiny CRD, Controller And The Operator Pattern — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: GitOps Drift And Controller Failures — Kubernetes: Production-Grade Container Orchestration
- SIEM Architecture: Ingestion Pipelines & Indexing — Security Operations & Threat Hunting (SOC)
- Adversary Tactics, Techniques & Procedures (TTP) Mapping — Security Operations & Threat Hunting (SOC)
- Recovery & System Validation Testing — Security Operations & Threat Hunting (SOC)
- Lockfiles And Reproducible Builds — Application Security & Threat Modeling for Engineers
- Dynamic Scanning — Application Security & Threat Modeling for Engineers
- The Licence, OpenTofu And IBM — Infrastructure as Code with Terraform
- Tearing It Down With Destroy — Infrastructure as Code with Terraform
- Parameterising With Input Variables — Infrastructure as Code with Terraform
- Detecting And Fixing Configuration Drift — Infrastructure as Code with Terraform
- The Plan That Wanted To Destroy Production — HashiCorp Terraform Associate (004) Exam Prep
- State: Terraform's Memory Of What It Built — HashiCorp Terraform Associate (004) Exam Prep
- Where Modules Come From — HashiCorp Terraform Associate (004) Exam Prep
- Remote State With The Backend Block — HashiCorp Terraform Associate (004) Exam Prep
- Drift: When Reality Stops Matching State — HashiCorp Terraform Associate (004) Exam Prep
- Importing What Terraform Did Not Build — HashiCorp Terraform Associate (004) Exam Prep
- Collaboration And Governance: Teams, Policies, Registry And Health — HashiCorp Terraform Associate (004) Exam Prep
- Scheduling: cron Jobs With Names, And Timers — RHCE in Ansible (EX294): Automate Red Hat Systems
- Users And Groups From A List, With Passwords That Settle — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- NIST glossary: baseline configuration
- The Twelve-Factor App: dev/prod parity
- Docker overview
- Argo CD: Diffing customization
- Argo CD: Automated sync policy
- NIST glossary: configuration management
- Tutorial: manage resource drift