Building Terraform modules is easy; designing them well is not. This post introduces a GitHub Copilot agent skill called terraform-module-creator that prioritizes design judgment over code generation. Rather than turning a prompt directly into files, the skill follows a deliberate workflow: evaluating whether a module should exist, defining its boundary, designing a minimal interface, and only then generating code. It integrates Azure MCP and HashiCorp Terraform Registry MCP to pull live provider documentation and best practices at design time. The skill produces full module scaffolding including README, terraform-docs config, runnable examples, and validation steps (fmt, validate, tflint). It also supports review and refactor modes for existing modules, and encourages versioning discipline for shared modules. Core design principles include KISS, DRY with judgment, clear responsibility, and opinionated safe defaults.

Table of contents
The module problem is not code generationWhy generic AI Terraform generation is not enoughWhy I built the terraform-module-creator skillThe principles that I wanted baked into the skillWhy Azure MCP and HashiCorp MCP guidance mattersWhat the skill produces beyond TerraformExample output from the skillWhere this fits in the engineering lifecyclePractical takeawaysWrapping Up1 Comment
Sort: