Automating Auto Scaling Group in AWS Using Terraform
This project demonstrates how to deploy an AWS Auto Scaling Group (ASG) behind an Application Load Balancer (ALB) using Terraform. It provisions web servers using an EC2 Launch Template with an Ubuntu 22.04 image, managed by an Auto Scaling Group. The web servers are accessible through an ALB, and they serve a basic webpage using apache httpd.
- Auto Scaling Group with a minimum of 1 instance, maximum of 3 instances.
- Launch Template for EC2 instances running Ubuntu 22.04.
- Application Load Balancer to distribute traffic across EC2 instances.
- Security Groups to allow traffic from the internet on port 80 (HTTP).
- Health Checks for monitoring instance health within the Auto Scaling Group.
- EC2 instances with Apache web server.
- Auto Scaling Group with scaling policies.
- Application Load Balancer.
- Target Group for load balancing traffic.
- Security Group to allow HTTP access.
- Plan the Infrastructure
- Initialize Terraform with your cloud provider
- Write provisioning in terraform
- Apply the configuration