This is an Infrastructure as Code cloud project that uses Terraform to provision a server with WordPress installed.
This architecture ensures high-availability, security, scalability and complete automation of the entire process.
The components of the architecture include...
A VPC that contains 6 subnets - 2 public and 4 private.
2 route tables within the VPC. One public, with internet gateway and the other private with a NAT gateway.
The public route table is associated with the 2 public subnets, while the private route table is associated with 2 of the private subnets.
An RDS database within 2 of the private subnets, with security group allowing traffic from the WordPress server.
Launch template which is provisioned using custom user_data to install the LAMP stack, and configure WordPress with connection to the RDS database. It has a security group which allows traffic from an internet-facing Application loadblancer on port 80.
Autoscaling group which is mainly used to spin up servers from the Launch template.
Target group, which is associated with the Launch Template and the Application LoadBalancer.
The Application LoadBalancer listens on port 80 for requests from the internet.