Terraform-Case-Study
For a detailed solution to this case study, click this link: https://medium.com/devops-guides/creating-an-architecture-using-terraform-on-aws-case-study-7cd9c1857873
Step 1: Create an EC2 Instance using the Ubuntu AMI.
Step 2: Install Terraform on EC2 Instance.
Step 3: Create the script for VPC, Subnets, Route table, elastic network interface, internet gateway, nat gateway & security groups.
Step 4: Create a main.tf file & paste the complete script here.
Step 5: Initialize terraform using the command: terraform init
Step 6: Create a plan using the command: terraform plan
Step 7: Use this command to create complete infrstructure & installed apache2 on this infrastructure: terraform apply
Step 8: Infrastructure will be successfully created & Apache 2 will be successfully installed on both instances.
Step 9: Apache2 installation shown on the first instance due to public IP address.