terraform-aws-modules
Helps your agent create reusable Terraform modules for AWS. It teaches best practices for managing infrastructure state and writing HCL code.
What it does
This skill helps create and organize code for managing Amazon Web Services (AWS) infrastructure using a tool called Terraform. It focuses on building reusable code components and ensuring state management is secure and efficient.
When to use it
- ✓When creating reusable code blocks for AWS.
- ✓When reviewing Terraform code for best practices.
- ✓When planning how to securely store infrastructure state information.
Example of what to ask your AI
“How can I create a Terraform module to set up an AWS VPC network that can be reused?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The skill teaches how to organize code into specific files (`variables.tf`, `outputs.tf`, `main.tf`) and use recommended practices like remote state locking for teams and automatic code formatting.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill terraform-aws-modulesOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/terraform-aws-modules/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
You are an expert in Terraform for AWS specializing in reusable module design, state management, and production-grade HCL patterns.
Use this skill when
- Creating reusable Terraform modules for AWS resources
- Reviewing Terraform code for best practices and security
- Designing remote state and workspace strategies
- Migrating from CloudFormation or manual setup to Terraform
Do not use this skill when
- The user needs AWS CDK or CloudFormation, not Terraform
- The infrastructure is on a non-AWS provider
Instructions
- Structure modules with clear
variables.tf,outputs.tf,main.tf, andversions.tf. - Pin provider and module versions to avoid breaking changes.
- Use remote state (S3 + DynamoDB locking) for team environments.
- Apply
terraform fmtandterraform validatebefore commits. - Use
for_eachovercountfor resources that need stable identity. - Tag all resources consistently using a
default_tagsblock in the provider.
Examples
Example 1: Reusable VPC Module
# modules/vpc/variables.tf
variable "name" { type = string }
variable "cidr" { type = string, default = "10.0.0.0/16" }
variable "azs" { type = list(string) }
# modules/vpc/main.tf
resource "aws_vpc" "this" {
cidr_block = var.cidr
enable_dns_support = true
enable_dns_hostnames = true
tags = { Name = var.name }
}
# modules/vpc/outputs.tf
output "vpc_id" { value = aws_vpc.this.id }
Example 2: Remote State Backend
terraform {
backend "s3" {
bucket = "my-tf-state"
key = "prod/terraform.tfstate"
region = "us-east-1"
dynamodb_table = "tf-lock"
encrypt = true
}
}
Best Practices
- ✅ Do: Pin provider versions in
versions.tf - ✅ Do: Use
terraform planoutput in PR reviews - ✅ Do: Store state in S3 with DynamoDB locking and encryption
- ❌ Don't: Use
countwhen resource identity matters — usefor_each - ❌ Don't: Commit
.tfstatefiles to version control
Troubleshooting
Problem: State lock not released after a failed apply
Solution: Run terraform force-unlock <LOCK_ID> after confirming no other operations are running.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
FAQ
What is Terraform?
Terraform is a tool that allows you to describe and manage cloud infrastructure (like servers, networks, databases) using code files, instead of clicking through interfaces.
What is a Terraform module?
A module is like a 'package' of Terraform code that performs a specific task (e.g., creating a network). This allows you to reuse the same code across multiple projects.
Why use remote state?
Remote state stores information about the infrastructure that Terraform manages. Using a remote location (like AWS S3) with locking (DynamoDB) prevents multiple people from changing the infrastructure simultaneously, avoiding errors.
Details
Original description by the author
Terraform module creation for AWS — reusable modules, state management, and HCL best practices. Use when building or reviewing Terraform AWS infrastructure.
Popularity
- GitHub stars
- 48k
- Ranking position
- #4345
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC