terraform-engineer-skill/SKILL.md
Infrastructure as Code (IaC) expert using Terraform/OpenTofu, HCL, and modern state management.
npx skillsauth add 404kidwiz/claude-supercode-skills terraform-engineerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides Infrastructure as Code expertise specializing in Terraform and OpenTofu for cloud provisioning. Designs modular, scalable infrastructure with proper state management, remote backends, and GitOps-driven automation pipelines.
Scenario: Building a secure, compliant multi-cloud landing zone.
Implementation:
Results:
Scenario: Building a production-ready Kubernetes platform.
Implementation:
Results:
Scenario: Importing manually provisioned infrastructure into Terraform.
Implementation:
Results:
| Scale | Strategy | Backend |
|-------|----------|---------|
| Individual | Local State | local (Not recommended for prod) |
| Small Team | Remote State + Locking | s3 + DynamoDB (AWS) / azurerm (Azure) |
| Enterprise | Managed State + Runs | Terraform Cloud / spacelift / env0 |
| GitOps | PR-driven Runs | Atlantis (Self-hosted) |
What are you building?
│
├─ **Root Module** (The "Glue")
│ ├─ `main.tf`: Instantiates child modules
│ ├─ `providers.tf`: Provider config
│ └─ `backend.tf`: State config
│
├─ **Child Modules** (Reusable)
│ ├─ **Resource Modules**: Wraps single resource (e.g., `s3-secure-bucket`)
│ │ └─ Enforces tagging, encryption, logging defaults.
│ │
│ └─ **Infrastructure Modules**: Logical group (e.g., `vpc-with-peering`)
│ └─ Combines VPC, Subnets, Route Tables, NAT Gateways.
│
└─ **Composition** (Terragrunt/Workspaces)
├─ `prod/`
├─ `stage/`
└─ `dev/`
| Tool | Approach | Best For | |------|----------|----------| | Terraform | HCL (Declarative) | Industry standard, massive ecosystem. | | Pulumi | General Purpose Lang (TS/Py) | Devs who hate HCL, dynamic logic. | | Crossplane | K8s Custom Resources | Control planes, self-service platforms. | | CloudFormation | YAML/JSON | AWS purists (drift detection is native). |
Red Flags → Escalate to security-engineer:
provider blockterraform.tfstate)0.0.0.0/0 on SSH/RDPGoal: Create a 3-tier VPC network using the community module.
Steps:
Dependency Definition (versions.tf)
terraform {
required_version = ">= 1.5.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
Implementation (main.tf)
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "5.5.1"
name = "prod-vpc"
cidr = "10.0.0.0/16"
azs = ["us-east-1a", "us-east-1b", "us-east-1c"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
enable_nat_gateway = true
single_nat_gateway = false # High Availability
enable_vpn_gateway = false
tags = {
Environment = "Production"
Terraform = "true"
}
}
Outputs (outputs.tf)
output "vpc_id" {
description = "The ID of the VPC"
value = module.vpc.vpc_id
}
Goal: Bring a manually created EC2 instance under Terraform control.
Steps:
Identify Resource ID
i-0123456789abcdef0Write Terraform Code
resource "aws_instance" "legacy_server" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
# Fill in other known details...
}
Run Import
terraform import aws_instance.legacy_server i-0123456789abcdef0
(Or use import block in TF 1.5+)
import {
to = aws_instance.legacy_server
id = "i-0123456789abcdef0"
}
Reconcile
terraform plan.What it looks like:
main.tf controlling VPC, Database, EKS, and 50 Microservices.terraform plan takes 10 minutes.Why it fails:
Correct approach:
network, data, app-cluster.terraform_remote_state data source to read outputs from other layers.What it looks like:
vpc-prod.tf, vpc-dev.tf files with duplicated code.Why it fails:
Correct approach:
terraform workspace with var.environment.prod.tfvars vs dev.tfvars..gitignoreWhat it looks like:
.terraform/ directory (plugins).terraform.tfvars (secrets).Why it fails:
Correct approach:
.gitignore for Terraform:
.terraform/
*.tfstate
*.tfstate.backup
*.tfvars
.terraform.lock.hcl (Commit this one!)
Code Quality:
terraform fmt -recursive.terraform validate.tflint for provider-specific issues.terraform-docs.Security:
encrypted = true on all storage (EBS, S3, RDS).Reliability:
~> 5.0).destroy provisioners tested (or protection enabled for DBs).development
Expert in automating Excel workflows using Node.js (ExcelJS, SheetJS) and Python (pandas, openpyxl).
content-media
Expert in designing durable, scalable workflow systems using Temporal, Camunda, and Event-Driven Architectures.
tools
Use when user needs WordPress development, theme or plugin creation, site optimization, security hardening, multisite management, or scaling WordPress from small sites to enterprise platforms.
tools
Expert in Windows Server, Active Directory (AD DS), Hybrid Identity (Entra ID), and PowerShell automation.