From terraform
Scaffold a new Terraform module with the canonical file layout — terraform.tf, main.tf, variables.tf, outputs.tf, README.md — and house style. Use when creating a new Terraform module, adding a module under a modules/ directory, or restructuring an existing module to the standard layout.
How this skill is triggered — by the user, by Claude, or both
Slash command
/terraform:terraform-moduleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Creates a module with the canonical five-file layout. Apply the `terraform-style` skill's
Creates a module with the canonical five-file layout. Apply the terraform-style skill's
conventions while filling in real content, and finish with the terraform-validate workflow.
modules/ecr-registry, not
modules/registry-stuff). One cohesive concern per module.terraform.tf on day one.Copy the skeletons from this skill's templates/ directory into the new module directory and replace the placeholder content:
| File | Template shows |
|---|---|
terraform.tf | required_version + required_providers with major-version pins |
main.tf | a primary resource named main, plus naming-convention reminders |
variables.tf | a required flat variable, an object variable with optional() defaults |
outputs.tf | flat primary-attribute outputs and one grouped object output |
README.md | title, purpose paragraph, Usage example, Inputs/Outputs tables |
Every variable and output keeps a description — the linter enforces this.
While implementing, follow the terraform-style skill. The rules that most often shape a new
module's interface:
set(string) for unordered unique inputs; primary resource named main;name_prefix (trailing -) for account-unique named resources;for_each = toset(var.x ? ["true"] : []);null, never "".Split cohesive resource families into domain files (iam-node.tf, signing.tf) once main.tf
grows past a screenful — the five canonical files are the floor, not the ceiling.
module "x" { source = "../..." })
showing only the inputs a typical caller sets.terraform-validate workflow (fmt → init/validate → tflint) on the new module before
committing.npx claudepluginhub bitwise-media-group/skills --plugin terraformGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.