This project is a modular Infrastructure as Code that provisions a multi-tier web application infrastructure on AWS using terraform.
- Highly Available: Auto Scaling Groups with Multi-AZ deployments ensure minimal downtime and fault tolerance.
- Scalable, Elastic and Cost-Effective:: Auto Scaling policies and CloudWatch alarms dynamically adjust resources based on CPU utilization, optimizing both performance and cost 💰.
- High Performance: Load Balancers (ALBs) efficiently distribute traffic across web and app tiers, enhancing responsiveness and user experience.
- Robust Security: An AWS WAF that blocks suspicious IPs, anonymous proxies and IP addresses that have been identified as actively engaging in malicious activities (from MadPot), while comprehensive Security Groups enforce strict inter-tier communication controls.
- Reliable, Performant & Scalable Database: A Multi-AZ RDS cluster with a primary instance and read replica is deployed to handle demanding workloads, improve read performance, and ensure data redundancy.
- Tiered Architecture: Separation of concerns enhances manageability, scalability, and security by isolating different components.
- Automating and managing cloud infrastructure with Infrastructure as Code using Terraform.
- Architecting Resilient, Secure, Reliable, Cost-Effective and Scalable Cloud Infrastructure on AWS ☁️.
- Optimizing reusability and scalability by structuring Terraform code into self-contained modules.
├── modules
│ ├── asgs
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── lbs
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── rds
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── security-groups
│ │ ├── main.tf
│ │ └── variables.tf
│ ├── vpc
│ │ ├── main.tf
│ │ └── variables.tf
│ └── waf
│ ├── main.tf
│ └── variables.tf
- AWS account with appropriate permissions.
- Terraform installed.
- Clone the repository.
- Check main.tf for an example of using modules and Add variables values (whether cli args or TF_VAR env vars or .tfvars .auto.tfvars or defaults in variables.tf)
- Run
terraform initto initialize the Terraform project. - Run
terraform planto preview the changes. - Run
terraform applyto deploy the infrastructure.
To destroy the infrastructure, run terraform destroy.


