← ClaudeAtlas

create-modulelisted

Build a reusable Terraform module, or turn existing Terraform into one, without destroying a single resource: inventory the code, design a typed interface, write MODULE-PLAN.md with a moved block for every address and the expected plan for every caller, then hand each chunk to terraform-author and check it. Four modes: new (a module from a description), extract (lift resources out of a root into a module call), dedupe (converge copies across environments or roots onto one module) and refactor (rework a module's variables and outputs while every caller plans clean).
rhawk117/cc-terraform-harness · ★ 1 · API & Backend · score 73
Install: claude install-skill rhawk117/cc-terraform-harness
# Create a Terraform module A module is done when every caller plans exactly what MODULE-PLAN.md said it would, usually 0 to destroy, and the module could be called by a root that does not exist yet. You plan; terraform-author writes. Every HCL line follows the writing-terraform skill, so this skill adds the module-level decisions it does not make: the boundary, the interface, the moved map, the order of the work and the gates between chunks. ## Standing rules These hold from the first read to the hand-off. 1. **No HCL before an approved plan.** Nothing under the module or a caller root changes until MODULE-PLAN.md passes `validate_plan.py --require-approved`. Approval comes from the user through AskUserQuestion. When you cannot ask (a headless run), the prompt's explicit go-ahead counts, recorded as `approved_by: prompt`; without one, stop after writing the plan. 2. **State never moves by accident.** Every resource or module address that leaves a root gets a `moved` block in that root's `moved.tf`, because a module can only move its own objects and the caller owns the state. A module called with `for_each` takes one block per key per resource. A chunk is not done until `moved_coverage.py` is clean for every root it touched. Keep the blocks after apply; deleting one later turns the move back into a destroy for anyone who has not applied. 3. **Live identity is kept.** A name-like argument (`bucket`, `identifier`, `name`, `cidr_block`) must evaluate in each caller to the va