Example Terraform Projects 💻#
Complete, working Terraform configurations demonstrating different patterns and architectures.
Available Examples#
| Example | Description | Level |
|---|---|---|
| Basic EC2 | Simple EC2 instance with security group and user data | ⭐ Beginner |
| VPC Module | Reusable VPC using community Terraform Registry module | ⭐⭐ Intermediate |
| Multi-Tier App | 3-tier web application with ALB, ASG, and RDS | ⭐⭐⭐ Advanced |
| Production Ready | Full production setup with remote state, CI/CD, all best practices | ⭐⭐⭐ Production |
| Serverless API | Serverless REST API with Lambda + API Gateway + DynamoDB | ⭐⭐⭐⭐ Advanced |
| ECS Fargate | Containerized app with ECS Fargate, ALB, and auto-scaling | ⭐⭐⭐⭐ Advanced |
| EKS Cluster | Managed Kubernetes cluster with node groups and add-ons | ⭐⭐⭐⭐⭐ Expert |
| S3 + CloudFront Website | Static website with S3, CloudFront CDN, WAF, and custom domain | ⭐⭐⭐ Intermediate |
New Examples#
Note: Each example is a complete, runnable Terraform configuration. Clone the repo and try them out!
Quick Start#
# Pick an example
cd examples/basic-ec2
# Initialize
terraform init
# Preview changes
terraform plan
# Deploy
terraform apply
# Clean up when done
terraform destroy