This project is used to automate the process of a three tier architecture in AWS. I have the Main.tf which is executed through the CI and CD pipelines in AWS.
The code does the following:
- Creates a VPC with the CIDR block provided in the region you want.
- Creates web subnets,
- Creates Web Public Subnet.
- Creates Application Public Subnet.
- Creates Database Private Subnet
- Creates Internet Gateway
- Creates Web layber route table
- Creates Web Subnet association with Web route table
- Creates EC2 Instance
- Creates Web Security Group
- Creates Application Security Group
- Creates Database Security Group
#Deployment -
- checkout repo
- make sure terraform installed
- execute below commands
- terraform init
- terraform plan
- terraform validate
- terraform apply
Configured backend to maintain the workspace wise state file in AWS S3 with rescrited access.