Agent skill · software engineering · jeremylongshore

building-terraform-modules

Execute this skill empowers AI assistant to build reusable terraform

Why this skill is useful

Adds executable scripts and a structured approach for creating Terraform modules that enhance the AI's capability to generate production-ready infrastructure as code.

What it needs

Requires terraform, terraform-docs installed locally. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Building Terraform Modules Overview Build reusable, production-ready Terraform modules with proper variable definitions, outputs, validation rules, documentation, and examples. Generate modules following HashiCorp's standard module structure for AWS, GCP, and Azure resources with security best practices, tagging conventions, and lifecycle management. Prerequisites Terraform 1.0+ installed (terraform version) Cloud provider credentials configured for the target platform Understanding of the infrastructure resources the module will manage Familiarity with HCL syntax and Terraform module conventions terraform-docs installed for automated documentation generation (optional) Instructions 1. Define the module scope: determine which cloud resources the module manages and its input/output contract 2. Create the standard module file structure: main.tf, variables.tf, outputs.tf, versions.tf, locals.tf 3. Write versions.tf with requiredversion and requiredproviders blocks pinned to stable versions 4. Define input variables in variables.tf with descriptions, types, defaults, and validation rules 5. Implement resources in main.tf using variables for all configurable values; use locals for computed values 6. Add meaningful outputs in outputs.tf for resource IDs, ARNs, endpoints, and connection strings 7. Implement security defaults: encryption enabled, public access blocked, least-privilege IAM, logging enabled 8. Create an examples/ directory with at least one complete usage example showing module invocation 9. Generate documentation with terraform-docs markdown table . > README.md 10. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/building-terraform-modules--d81cd2

View the source on GitHub

Browse the @skills marketplace