mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-08 16:59:59 +00:00
Add reusable Terraform modules and per-environment configs (dev/uat/prod) in us-west-2 covering: VPC (3 AZ public/private), EKS 1.29 with IRSA and ALB/EBS/EFS CSI add-ons, RDS PostgreSQL 15, four ECR repos, IAM roles (EKS node, ALB controller IRSA, GitHub Actions OIDC), Route53 + ACM for samosachaat.art, and EFS for model weights. State backend on S3 (samosachaat-terraform-state) with DynamoDB lock table. terraform validate passes for dev, uat, and prod. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.2 KiB
HCL
46 lines
1.2 KiB
HCL
variable "name" {
|
|
description = "Name prefix used for the VPC and related resources."
|
|
type = string
|
|
}
|
|
|
|
variable "cluster_name" {
|
|
description = "EKS cluster name used to tag subnets so the AWS Load Balancer Controller can discover them."
|
|
type = string
|
|
}
|
|
|
|
variable "cidr" {
|
|
description = "CIDR block for the VPC."
|
|
type = string
|
|
default = "10.0.0.0/16"
|
|
}
|
|
|
|
variable "azs" {
|
|
description = "Availability zones to spread subnets across."
|
|
type = list(string)
|
|
default = ["us-west-2a", "us-west-2b", "us-west-2c"]
|
|
}
|
|
|
|
variable "private_subnets" {
|
|
description = "Private subnet CIDRs (one per AZ, in matching order)."
|
|
type = list(string)
|
|
default = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
|
|
}
|
|
|
|
variable "public_subnets" {
|
|
description = "Public subnet CIDRs (one per AZ, in matching order)."
|
|
type = list(string)
|
|
default = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
|
|
}
|
|
|
|
variable "single_nat_gateway" {
|
|
description = "When true, all private subnets route through a single NAT gateway (dev). When false, one NAT per AZ (prod)."
|
|
type = bool
|
|
default = true
|
|
}
|
|
|
|
variable "tags" {
|
|
description = "Tags applied to every resource."
|
|
type = map(string)
|
|
default = {}
|
|
}
|