- I am going to create an Application Load Balancer. To create the Application Load Balancer, we first need to create a new target group.
- To create an Elastic Load Balancer target group for routing traffic to instances , we have to create a file for target group with .tf extension.
- Create a new file for the target group, and copy the contents from target-group.tf into it .
- After that, we need to associate targets with the target group. To do this, create two EC2 instances in two separate availability zones using the ec2.tf file.
- Finally, set up an Elastic Load Balancer (ELB) to distribute incoming traffic across our instances. You can find the ELB configuration in the elb.tf file in my repository."