Write composable Terraform/OpenTofu modules: single responsibility, typed variables with validation, documented outputs, for_each over count to avoid reorder churn, pinned provider requirements, and a working example.
Scanned 9/23/2026
npx -y skills add mcorbett51090/RavenClaude --skill iac-module-design --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Iac Module Design?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/mcorbett51090-iac-module-design)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: iac-module-design
description: "Write composable Terraform/OpenTofu modules: single responsibility, typed variables with validation, documented outputs, for_each over count to avoid reorder churn, pinned provider requirements, and a working example."
---
# IaC Module Design
## One module, one job
Typed `variable` blocks + `validation`; documented `output`s; a README with an example.
## for_each, not count
`count` keys by **index** -> removing a middle element recreates the rest. `for_each` keys by a **stable id** -> no churn on reorder.
## Pin
`required_providers` with version constraints in the module; commit the **lock file** at the root.
## No secret leakage
Mark `sensitive`, source from a manager; never put a secret in an `output` (it lands in plaintext state).
## Test
Examples that `plan` cleanly + module tests (terraform test / Terratest).
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!