Deploying Web App in EC2 and attach them to a Load Balancer
This project is Hands-On Terraform,That deploying a web-app in EC2 and attach it to a Load Balancer.
Project is for Creating:
- 1 VPC
- 2 Subnets
- 2 Security Groups
- 1 S3
- IAM Role for Instances
- 2 Instances
- 1 Application Load Balancer
To run this project, After Cloning this repo:
$ export AWS_ACCESS_KEY_ID=YOUR_ACCESS_KEY
$ export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY
$ terraform fmt
$ terraform init
$ terraform validate
$ terraform plan -out terra-app.tfplan
$ terraform apply terra-app.tfplan
Don't Forget to Destroy all Infrastructure
$ terraform destroy -auto-approve