AGENT SKILL

drin-terraform-state-repair

Expert workflow for resolving Terraform state drifts, locks, and corruption.

使用场景运维与部署
License 许可
MIT
最近更新
2026-04-11
Stars
★ 12
Forks
1

01 前言 Front Matter

name
drin-terraform-state-repair
status
production
description
Expert workflow for resolving Terraform state drifts, locks, and corruption.

03 SKILL.md 正文

Terraform State Repair

Purpose

To safely recover infrastructure management when the state file becomes inconsistent or locked.

Actions

  1. Unlocking: Forcefully release stuck state locks (force-unlock).
  2. Refresh: terraform refresh to bring state in sync with real-world infrastructure.
  3. Import: Map existing resources not in state to the code (terraform import).
  4. State Edit: Manually (but safely) removing/renaming items in state (terraform state rm/mv).

Rules

  • Always backup the state file before any manual modification.
  • Document every manual import or rm action.
  • Verify the plan after repair shows zero changes.

04 同仓库更多 Skills