The most detailed free FDE + DevOps library: 140+ lessons, 70+ labs and 80 long-form articles, in English and Turkish. Start learning →

DevOps Practitioner · Module 4: Infrastructure as Code · Lab

Create Controlled Drift and Explain the Plan

45 min hands-on · Core

A local machine with OpenTofu or Terraform installed; the L34 fixture still applied. Hand edits only to fixture files, never to state.

Local guide: run the steps below on your own machine in order, then check the validation list.

Objectives

  • Create drift by hand and surface it with a plan
  • Decide adopt versus revert with a written reason
  • Show the empty plan after reconciliation
  1. Step 1

    Drift by hand

    Edit one managed file outside the tool. Run plan and quote the unexpected diff. Name the drifted attribute and the hand change that caused it.

  2. Step 2

    Decide and reconcile

    Write the decision with its reason: revert by applying (hand edit was wrong) or adopt into code (hand edit was right). Execute it and run plan again to show empty.

  3. Step 3

    Record both branches

    Repeat once with the opposite decision so the record shows both branches: one revert, one adoption, each with its reason and its empty final plan.

How to confirm it worked

  • Drift diff quoted from plan output
  • Both branches recorded with written reasons
  • Empty plans shown after each reconciliation
  • State file never hand-edited