SkillVaultskills Browse all 500 skills

Infrastructure · Version 1.4.0 · Reviewed 2026-08-02

Terraform Module Designer

Review and harden module interface design and variable validation with evidence, explicit trade-offs, and a verification plan.

4 method steps 6 documented failure modes 5 diagnostic checks 7 quality gates

Designs reusable Terraform modules with clean interfaces, sensible defaults, and safe upgrade paths.

₹99 one-time

Get this skill archive

What this skill helps you do

  • Module interface design
  • Variable validation
  • Version strategy

How Terraform Module Designer works

You provide

Schema, query plans, and the real access pattern

It inspects

Plan accuracy and lock behavior for module interface design

It decides

A variable validation change weighed against write cost

You verify

Re-measured plan with buffer reads and timing compared

What it checks first

Terraform Module Designer designs reusable Terraform modules with clean interfaces, sensible defaults, and safe upgrade paths. Use it when the work involves Module interface design, Variable validation, Version strategy.

  1. Every resource replacement in the plan, and whether that resource holds state that cannot be recreated.
  2. Address stability across refactors, since re-indexing destroys and recreates unrelated resources.
  3. Whether the executing principal has broader permissions than the change requires.
  4. Provider version pinning, because an unpinned upgrade introduces unrequested plan changes.
  5. Whether secrets appear in state, which is stored in plaintext regardless of the sensitive marker.

Failure modes it recognizes

  • An immutable attribute change silently forcing replacement of a database or stateful volume.
  • Moving resources between modules without move blocks, causing destroy-and-recreate.
  • A data source resolving at plan time to a value that changes before apply, producing inconsistency.
  • State lock held by a crashed run, blocking every subsequent apply until manually cleared.
  • A count-to-for_each conversion re-creating every resource because addresses changed.
  • Drift silenced with ignore_changes, which permanently disables reconciliation for that path.

Answers it will reject

  • Approving from the plan summary counts instead of reading every replacement line.
  • Using targeted applies to work around a broken dependency graph, leaving state partially applied.
  • Committing state files to version control, exposing secrets and creating infrastructure merge conflicts.
  • Granting the pipeline administrative rights so that any plan will succeed.

Decision rules it applies

  • Any replacement of a stateful resource requires a tested backup and restore path before approval.
  • Prefer move blocks over destroy-and-recreate for refactors; they preserve state and cost nothing.
  • Pin provider versions and upgrade deliberately so plan noise is attributable to intent.
  • If the plan cannot be explained line by line, it has not been reviewed.

Evidence it asks for

  • Export the plan as JSON and programmatically list every replace action.
  • Cross-check each replacement against an inventory of stateful resources.
  • Rehearse the change in a non-production environment carrying representative state.

The method inside

  1. Turn module interface design into explicit functional requirements and quality-attribute constraints.
  2. Model the critical path, state, trust, and failure boundaries that govern variable validation.
  3. Compare viable designs for version strategy against weighted constraints and operational ownership.
  4. Select a design with consequences, rollout stages, observability, and a reversible adoption path.

Deliverables

  • Module interface design assessment
  • Variable validation decision and action plan
  • Version strategy verification checklist

Evidence requirements

  • Infrastructure code or configuration
  • Runtime topology and environment constraints
  • Plan, events, policies, and failure symptoms

Quality gates

  • Every material claim traces to supplied evidence or is labeled as a hypothesis.
  • The response follows the declared deliverable contract.
  • No execution, access, measurement, or verification is invented.
  • Secrets and personal data are redacted rather than repeated.
  • The user receives a concrete independent verification step.
  • The relevant failure modes in this domain were considered rather than only the reported symptom.
  • No listed anti-pattern was recommended as a solution.

Example task

Input

Turn this copy-pasted Terraform into a reusable module for three environments.

Expected output

The environments differ in only four values. Everything else is accidental duplication. Expose those four as variables with validation...

Boundaries and compatibility

Ideal for

  • Module interface design: produce a decision or artifact grounded in supplied evidence.
  • Variable validation: produce a decision or artifact grounded in supplied evidence.
  • Version strategy: produce a decision or artifact grounded in supplied evidence.

Out of scope

  • Applying infrastructure changes without approval
  • Assuming cloud access or live resource visibility

Agent compatibility

  • GitHub Copilot custom agents
  • Claude Agent Skills / SKILL.md
  • Any instruction-following chat model

Tool policy: Advisory by default. No tools are assumed. If the host provides tools, use read-only evidence gathering unless the user explicitly approves a scoped write or execution action.