This repository contains Terraform code to set up AWS infrastructure for a web application, including a VPC, subnet, internet gateway, route table, security group, and an EC2 instance running a web server.
Before you begin, ensure you have the following installed:
- Terraform
- An AWS account
- AWS CLI configured with appropriate permissions
git clone https://github.com/prasanth624/terraform-aws-web-app.git
cd terraform-aws-web-appRun the following command to initialize the Terraform configuration:
terraform initTo see what Terraform will create, run:
terraform planTo create the infrastructure, run:
terraform applyYou will be prompted to confirm the action. Type yes to proceed.
After the infrastructure is created, you can see the outputs by running:
terraform outputTo remove all resources created by Terraform, run:
terraform destroyYou will be prompted to confirm the destruction. Type yes to proceed.
Feel free to fork the repository and submit pull requests for any improvements or features you'd like to add!
This project is licensed under the MIT License. See the LICENSE file for more details.