Deploying a Highly Available Web App on AWS Using Terraform
Welcome to Day 4 of my 30 Days of Terraform challenge. If you followed along with my first article you remember we deployed a single server into a VPC using terraform. That was a great starting poi...

Source: DEV Community
Welcome to Day 4 of my 30 Days of Terraform challenge. If you followed along with my first article you remember we deployed a single server into a VPC using terraform. That was a great starting point but it had a massive flaw because a single server is a single point of failure. If that availability zone goes down or the server crashes your application goes offline with it. Today we are evolving our infrastructure from a simple hardcoded server into a fully configurable and highly available clustered deployment. We are going to build a custom Virtual Private Cloud block with public and private subnets and place our application servers in the private subnets for security while an Application Load Balancer routes internet traffic to them. Let us dive right into the architecture and the code. Overview In this setup we are building a robust network foundation. We will create a VPC spanning two Availability Zones to ensure redundancy. Our architecture includes an Application Load Balancer r