Use this when an engineer decides how to handle detected drift.
Manual Remediation
Manual remediation is when an engineer reviews detected drift and decides whether to revert it or update the desired state, appropriate when an automatic fix might cause harm.
1. Manual remediation for risky or ambiguous drift.
2. Decide revert vs update desired state.
3. Track in tickets.
4. Verify.
5. Prevent recurrence.
drift → ticket → decision → fix → verify
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
git apply --check <remediation.patch>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
For Drift Management → Manual Remediation, read back with git apply --check <remediation.patch>. Success is discriminated by the patch is reviewed for the correct target, passes context/conflict checks against current state, the approved change is applied through the controlled path, and fresh read-back removes only the intended drift; failure remains when the patch has context failures, touches unexpected files/objects, applies after an unreviewed baseline change, or the target still shows the original drift after the change. git apply --check <patch> shows patch context applicability to the local tree at that moment; it does not approve, execute or verify the remediation on the managed target.
Step 2 Common mistakes Narrow the fault
- Manual fixes not reflected in code.
Step 3 Observation-driven branch and next-check logic Narrow the fault
Start Drift Management → Manual Remediation from one identified target/request/artifact and timestamp. Decision path: if the patch fails the dry apply, refresh current state and regenerate rather than forcing it; if the dry apply succeeds but target identity or approval is unclear, stop before mutation; if after an approved change, recollect state and compare the original drift discriminator instead of trusting command exit status.
- Review before reverting.
- Sometimes the code is wrong.
- Document the decision.
- Ticket for manual remediation — tracking
- Decision: revert or codify — resolution
- Verification after fix — closure
ReferenceHow it works1 section · depth on demand
How it works
Drift Management → Manual Remediation owns the proposed corrective patch, its preconditions against current state, the human approval boundary and the subsequent read-back that determines whether manual repair converged. A manual remediation patch is safe only when it is generated against the same current baseline that will receive it; dry application checks context and conflicts before any controlled write is considered. Keep these adjacent boundaries separate: repository freshness, target maintenance state, concurrent changes, rollback material and post-change validation are independent things to check. A key diagnostic distinction is that a patch that applies cleanly is not evidence that it is desirable, and a patch that was correct minutes ago can become unsafe after a concurrent change.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Manual remediation means drift is detected automatically but corrected by a person after review. It fits settings where automatic correction is risky, where drift may be a legitimate emergency change, or where the desired state itself might be wrong.
Making manual remediation efficient:
- Reports show the exact difference and the command or job to fix it.
- Each finding has an owner and a due date based on risk.
- One-click remediation jobs apply the fix after review.
- Accepted deviations are recorded as documented exceptions so they stop reappearing.
Review which manual findings recur and are always fixed the same way — those are candidates for auto-remediation.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Drift Management > Manual Remediation. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.hashicorp.com/terraform/tutorials/state/resource-drift · confidence 94%