terraform-module

Solid

Creates Terraform modules following AWS Well-Architected Framework best practices. Generates variable definitions, outputs, documentation, and module composition patterns for common AWS services including VPC, ECS, Lambda, RDS, and S3. Triggers on: "create Terraform module", "infrastructure as code", "IaC", "provision AWS resources".

DevOps & Infrastructure 7 stars 3 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
30
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Terraform Module ## Instructions ### Step 1: Gather Requirements Ask: 1. What AWS resources are needed? (VPC, ECS, Lambda, RDS, S3, CloudFront) 2. What environment? (dev, staging, production, or multi-environment) 3. What compliance requirements? (encryption at rest, VPC isolation, logging) 4. Existing infrastructure to integrate with? (VPC ID, subnets, security groups) 5. State backend? (S3+DynamoDB, Terraform Cloud, local) ### Step 2: Module Structure Create the standard module layout: ``` modules/ my-service/ main.tf # Primary resource definitions variables.tf # Input variable declarations outputs.tf # Output value declarations versions.tf # Provider and terraform version constraints locals.tf # Local values and computed expressions data.tf # Data sources README.md # Module documentation ``` **versions.tf (always include):** ```hcl terraform { required_version = ">= 1.5" required_providers { aws = { source = "hashicorp/aws" version = "~> 5.0" } } } ``` ### Step 3: Variable Definitions Define variables with descriptions, types, and validation: ```hcl variable "environment" { description = "Deployment environment (dev, staging, production)" type = string validation { condition = contains(["dev", "staging", "production"], var.environment) error_message = "Environment must be dev, staging, or production." } } variable "service_name" ...

Details

Author
timwukp
Repository
timwukp/agent-skills-best-practice
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category