Using Terraform to Deploy EC2, VPC w/Public and Private Subnets, Aurora RDS Mysql instance and Load Balancer

Terraform, EC2, Aurora RDS Mysql Instance, VPC, Subnetting & Load Balancer
  1. Deploy a VPC w/ CIDR 10.0.0.0/16 w/ 2 public subnets w/ CIDRs or 10.0.1.0/24 and 10.0.2.0/24.
  2. Create a private subnet w/ CIDR 10.0.3.0/24 w/ an RDS MySQL instance (nano).
  3. A Load Balancer that will direct traffic to the public subnet.
  • AWS Account
  • Terraform installed
  • Fork my Github repo — https://github.com/Eric5825/Terraform.git
  • After forking repo you will have access to my code with the following files being created; provider.tf, vpc.tf and variable.tf .
Pictured above is my directory tree with all files listed.
The provider is configured as AWS the region its being launched in is us-east-1.
Terraform successfully initialized above.
After applying AWS credentials Terraform IaC is constructed
As seen above the Terraform apply was run successfully with 7 resources to be added.
Above is the results of the Iac I have constructed using Terraform.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eric Wainwright

DevOps engineer in search of Cloud Engineer role. Looking for Cloud Operations or Cloud Infrastructure opportunities.