SKILL: Terraform Patterns
SkillCloud & infraYour AI can review, design, and security-audit Terraform code, which teams use to build cloud infrastructure as code. It draws on proven patterns for module design, state management, provider setup, and security hardening. It also helps with policy checks using Sentinel or OPA and with plan-and-apply workflows in CI/CD.
Available today. Use it from your connected AI after setup.
No other account needed.
Add the skill, then share your Terraform files with your AI and ask for a review, a security audit, or a new module design.
Then ask your AI: use the SKILL: Terraform Patterns skill
What your AI can do with it
- Review Terraform infrastructure code for design and security issues
- Design Terraform modules using proven patterns
- Harden infrastructure configurations against security risks
- Write policy-as-code checks with Sentinel or OPA
- Advise on state management and provider configuration
- Set up CI/CD plan and apply workflows
What this skill tells your AI
The instructions your AI receives, as published by kinncj/heimdall in .claude/skills/terraform-patterns/SKILL.md and read by ahel’s review.
Module Structure
infra/terraform/
├── modules/
│ ├── networking/
│ ├── database/
│ └── compute/
└── environments/
├── dev/
│ ├── main.tf
│ ├── variables.tf
│ └── terraform.tfvars
├── staging/
└── prod/
Module Pattern
# modules/database/main.tf
resource "aws_db_instance" "main" {
# finops: ~$180/mo (db.t3.medium, 100GB gp3, single AZ)
identifier = "${var.environment}-${var.name}-db"
engine = "postgres"
engine_version = "16"
instance_class = var.instance_class
allocated_storage = var.storage_gb
storage_type = "gp3"
storage_encrypted = true
username = var.username
password = var.password
vpc_security_group_ids = [aws_security_group.db.id]
db_subnet_group_name = aws_db_subnet_group.main.name
backup_retention_period = var.environment == "prod" ? 7 : 1
deletion_protection = var.environment == "prod"
tags = merge(var.tags, {
Environment = var.environment
ManagedBy = "terraform"
})
}
Workflow
# Initialize (first time or after provider changes)
terraform init
# Format check (CI)
terraform fmt -check -recursive
# Validate syntax
terraform validate
# Plan (always before apply)
terraform plan -out=plan.tfplan -var-file=environments/dev/terraform.tfvars
# Apply (requires explicit instruction)
terraform apply plan.tfplan
# State inspection
terraform show
terraform state list
Rules
- ALWAYS run
terraform validatebefore reporting complete. - ALWAYS run
terraform planto show what will change. - NEVER run
terraform applywithout explicit instruction. - ALWAYS annotate resources with
# finops:cost estimate. - Use workspaces or separate state files per environment.
- Enable state locking (S3 + DynamoDB or Terraform Cloud).
- Tag all resources with environment, managed-by, and cost-center.
Signals
- GitHub stars
- 67
- Forks
- 4
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
terraform-patterns- Source
- github.com/kinncj/heimdall