☁️ DevOps & Cloud · Infrastructure as Code
Design Terraform modules people reuse
Composable modules with typed variables, sensible defaults, and outputs that compose upward.
intermediate~40 minDevOps EngineersSREsCloud Architects
Steps
- 1One module = one architectural decision (a network, a service, a store)
- 2Type every variable; constrain with validation blocks
- 3Defaults for 80% cases; no secret values as defaults ever
- 4Outputs expose only what callers genuinely consume
- 5Tag resources uniformly: env, owner, repo, cost-center
- 6Version modules semver; changelog breaking moves loudly
Common Pitfalls
- ▲Copy-pasted 800-line root modules nobody dares touch
- ▲count vs for_each migrations destroying remote state
Commands
Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill infrastructure-as-code-terraform-module-designInstall globally
$ npx skills add aniruddhaadak80/skills --skill infrastructure-as-code-terraform-module-design -gTags
#terraform#iac#devops-cloud#infrastructure-as-code