AWS LOADBALACER INFRASTRUCTURE CONFIGURATION WITH TERRAFORM AND CONFIGURATION MANAGEMENT WITH ANSIBLE
This project uses Terraform to create an AWS Loadbalancer infrastructure and Ansible to configure it to display each server's hostname.
- Terraform
- Ansible
- AWS CLI configured with your credentials
- Imports the modules
- Creates a VPC
- Creates a public subnet
- Creates a public route table
- Creates a public route table association
- Creates an internet gateway
- Creates a public route
- Defines the AWS provider
- Defines the AWS region
- Creates multiple EC2 instance
- Imports the public key
- Creates a security group for the EC2 instances
- Creates a security group for the load balancer
- Defines the default variables used in the project
- Creates a load balancer
- Creates a http and https load balancer listener rule
- Creates a load balancer target group
- Creates a load balancer target group attachment
- Creates a subdomain for the load balancer
- Creates a A record for the subdomain
- Creates a SSL certificate
- Creates a validation record for the SSL certificate
- Creates a SSL policy for the load balancer
- Validates the SSL certificate
- Creates a host inventory file for Ansible
- Configures the Servers with Ansible
- Imports the hosted zone id
- Installs Apache
- Sets the hostname of the servers
- Sets the timezone of the server
- Configures Apache to display the hostname
- Clone this repository
- Define your variables in
terraform.tfvars
file - Run
terraform init
to initialize the project - Run
terraform plan
to see the changes that will be applied - Run
terraform apply
to apply the changes