// the find
segmentio/stack
A set of Terraform modules for configuring production infrastructure with AWS
A Terraform module collection from Segment (circa 2016-2018) that provisions a full ECS-based AWS stack: VPC with multi-AZ subnets, NAT gateways, ECS cluster, per-service ELBs, bastion host, and CloudWatch logging. Officially unmaintained since 2023, left up as a reference. It's for teams who want to understand how Segment wired together ECS infrastructure, not for anyone starting a new project today.
The networking subnet design is genuinely well-thought-out — the /18 per AZ split with separate internal/external subnets is textbook and the CIDR documentation in the README is unusually clear. The modular structure is clean: vpc, service, task, elb, rds are all independently referenceable. ELB-based service discovery via Route53 internal DNS is simple and works without a service mesh. The NAT instance option as a cheaper dev-environment alternative to NAT Gateway was a practical touch for 2016.
Unmaintained and targeting Terraform 0.x syntax — interpolation style `${var.foo}` everywhere, no `for_each`, no `dynamic` blocks. You would spend more time upgrading the HCL than you'd save from the modules. ECS with EC2 launch type and custom Packer AMIs is the hard way to run containers in 2024; ECS Fargate or EKS with managed node groups made this architecture obsolete. Classic ELB (not ALB) means no path-based routing, no WebSocket support, no HTTP/2. The custom `ecs-logs` sidecar for CloudWatch is unnecessary now that the awslogs driver is built into the ECS agent.