Claude Code Terraform Drift Skill for Refresh-Only Plans
Separate changes observed in real infrastructure from edits proposed by the current Terraform configuration.
中文Install in Claude Code
Use an authorized test environment and the existing Terraform state context. Confirm the selected workspace before comparing.
- Get the complete `plugins/devops/infrastructure-drift-detector/skills/detecting-infrastructure-drift` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/detecting-infrastructure-drift/SKILL.md`, open Claude Code at the project root, and call `/detecting-infrastructure-drift`.
Example task
A test resource's `owner` tag was edited outside Terraform while the configuration stayed unchanged. Inspect a refresh-only plan and identify the attribute.What to check
The report identifies the resource and tag change. Exit code 2 indicates that the generated plan contains differences.
Original SKILL.md on GitHub · Updated
Frequently asked question
Does exit code 2 from a normal plan prove drift?
It indicates differences in the plan. Inspect whether they come from configuration changes or externally changed state.