This project showcases implementing a scalable and resilient 2-tier architecture using Terraform and AWS. Leveraging the power of infrastructure as code, this setup provides a solid foundation for deploying web applications with high availability and fault tolerance.
-
Tier 1: Web Tier
-
EC2 instances provisioned in public subnets
-
Auto Scaling Group for handling the dynamic workload
-
Load Balancer for distributing traffic and ensuring high availability
-
Security Groups to control inbound and outbound traffic
-
-
Tier 2: Database Tier
-
RDS MySQL instance in a private subnet
-
Secure network access using security groups
-
To use this project, you need to have the following prerequisites:
-
AWS account with necessary permissions
-
Terraform installed on your local machine
-
Clone this repository to your local machine.
-
Configure your AWS credentials by setting the environment variables or using the AWS CLI.
-
Initialize the Terraform project.
$ terraform init
- Review the execution plan.
$ terraform plan
- Deploy the architecture.
$ terraform apply
- Confirm the deployment by typing yes when prompted.
- To clean up and destroy the infrastructure created by this project, run the following command:
$ terraform destroy
Note: Be cautious as this action cannot be undone.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.