terraform:drift

Community

Detect and resolve Terraform drift safely

Authorfabn
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Detect and resolve infrastructure drift where Terraform configuration diverges from remote state, avoiding accidental resource destruction or unsynchronized configurations. It automates discovery, plan-based analysis, and safe code alignment so repositories remain the single source of truth.

Core Features & Use Cases

  • Module Discovery: Locate Terraform root modules in a git repository and prompt the user to select a module when multiple are present.
  • Plan-based Detection & Classification: Run terraform plan (with an automatic init fallback when required) and categorize changes as destructive, risky, or safe, summarizing impacted resources in plain operational language.
  • Safe Alignment Workflow: Generate before/after .tf file diffs without applying changes, gate destructive deletions with explicit user choices, apply approved edits, run terraform fmt and validate, re-run plan for re-verification, and commit only after successful verification.
  • Use Case: A developer discovers that infrastructure was modified externally; use this skill to identify destructive deletions, choose whether to remove or recreate resources, and align code with remote state with an auditable commit.

Quick Start

Run the terraform drift skill on a repository module path to detect drift, review proposed diffs, and apply approved code alignment.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: terraform:drift
Download link: https://github.com/fabn/claude-plugins/archive/main.zip#terraform-drift

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.