Terraform Modules
Terraform AWS Web App Modules: VPC, ALB, ECS Fargate and RDS PostgreSQL
Four composable Terraform modules plus a complete example that run a containerised web app on AWS: private Fargate tasks, ALB with HTTPS, RDS PostgreSQL.
What you get: 1 file · 28.14 KB · ZIP
See purchase optionsProduct description
Terraform modules for the common small production stack on AWS: a VPC with public and private subnets, an Application Load Balancer, an ECS Fargate service and an RDS PostgreSQL database, wired together by a complete example with separate dev and prod variable files.
What is inside
- modules/vpc: 2 or 3 AZs, public and private subnet per AZ, internet gateway, NAT gateway (single for dev or one per AZ), private route table per AZ, locked default security group, optional VPC flow logs.
- modules/alb: security group, ip-type target group for Fargate, HTTP forward or HTTP to HTTPS redirect plus HTTPS listener with a TLS 1.3 policy, drop invalid headers, optional access logs and WAFv2 association.
- modules/ecs-fargate: cluster with Container Insights, FARGATE and FARGATE_SPOT, separate execution and task roles, least-privilege access to listed Secrets Manager and SSM ARNs only, read-only root filesystem, deployment circuit breaker with rollback, CPU target-tracking autoscaling, X86_64 or ARM64.
- modules/rds: PostgreSQL 17 by default, encrypted gp3 with storage autoscaling, TLS forced by parameter group, master password managed by RDS in Secrets Manager (never in Terraform state), Performance Insights, Enhanced Monitoring, backups, deletion protection, final snapshot.
- examples/complete with envs/dev.tfvars (2 AZs, 1 NAT, Spot, db.t4g.micro, public nginx image to test the path) and envs/prod.tfvars (3 AZs, NAT per AZ, HTTPS, ARM64, Multi-AZ RDS).
- 74 documented module variables with validations, 28 module outputs, tools/tfcheck.py offline reference checker, README with deploy steps, secrets usage, cost notes and scanner findings.
How it was checked
All .tf and .tfvars files parse with python-hcl2, and the included checker confirmed that every variable, local, module argument and module output reference resolves. A Checkov 3.4 scan passes 151 checks; the 8 open findings are documented defaults (for example HTTP when no certificate is set). terraform fmt, validate and plan were not run because no Terraform binary was available in our build environment; run terraform validate before your first apply.
Requirements
Terraform 1.5+, AWS provider 5.40 up to 6.x, AWS credentials. An ACM certificate for HTTPS.
Licence
Use in unlimited own and client projects. You may not resell or redistribute the modules themselves.
What you get
1 file · 28.14 KB
- Terraform-AWS-WebApp-Modules.zipZIP · 28.14 KB
Terraform Modules
Terraform AWS Web App Modules: VPC, ALB, ECS Fargate and RDS PostgreSQL
Four composable Terraform modules plus a complete example that run a containerised web app on AWS: private Fargate tasks, ALB with HTTPS, RDS PostgreSQL.
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 28.14 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$24.00