Scaffolds AWS infrastructure repos from architecture decisions or review findings. Takes architecture summary, recommended services, and remediation plan as input; produces Terraform or CDK scaffolding with required tags, security defaults, and CI/CD skeleton. Use when user wants to build from design output, generate IaC from findings, or scaffold a new repo.
Scaffolds AWS infrastructure repos from architecture decisions or review findings. Bridges design/review → implementation.
tags: project, environment, owner, cost_center, data_classification, lifecycle_stage, custom_tagsnetworking: vpc_cidr, az_count, cidr_constraintsroles: CI, developer, auditor, platform adminregion, enable_vpc_flow_logsdev.tfvars.example, stage.tfvars.example, prod.tfvars.example — template-style with ADD_VALUE_HERE and REPLACE_WITH_SECURE_PASSWORD; never guess customer values. See docs/terraform-tfvars-templates.md.Scaffold output MUST include all of the following for a fully functioning secure AWS infrastructure:
| Component | Required | Purpose |
|---|---|---|
| VPC | ✓ | Network isolation |
| Public subnets | ✓ | ALB, NAT; tag kubernetes.io/role/elb for EKS |
| Private subnets | ✓ | Workloads, RDS; tag kubernetes.io/role/internal-elb for EKS |
| Route tables | ✓ | Public (IGW), private (NAT) |
| Internet Gateway | ✓ | Public egress |
| NAT Gateway | ✓ | Private subnet egress |
| Security groups | ✓ | RDS, ALB, EKS; least privilege, no 0.0.0.0/0 on DB |
| KMS keys | ✓ | Secrets Manager, RDS; customer-managed, rotation enabled |
| IAM / IRSA | ✓ | ESO, Load Balancer Controller, ECR push for CI |
| VPC Flow Logs | ✓ | Network audit (optional but recommended) |
Adapt compute (EKS/ECS/Lambda), data (RDS/DynamoDB/S3), and ingress per application type.
When infrastructure_config is provided: Use its values for variables.tf (project, environment, owner, cost_center, vpc_cidr, etc.) and default_tags. Generate IAM roles/policies for each role in infrastructure_config.roles.
When fixing an existing repo (not greenfield):
| File | Purpose |
|---|---|
SKILL.md | This file |
README.md | Overview, usage |
scaffold-prompt.md | Template prompt to paste |
example-input.md | Sample architecture + findings input |
example-output.md | Sample Terraform scaffolding |