This setup demonstrates the deployment of a Dockerized NGINX instance using Terraform and AWS resources. The goal is to set up an NGINX server that is publicly accessible and displays the text “yo this is nginx” when accessed. The deployment uses a combination of AWS infrastructure, Docker, and Terraform to achieve this.
- Virtual Private Cloud (VPC): Contains public and private subnets.
- EC2 Instance: Deployed in the private subnet with dockerized NGINX.
- Security Groups: To ensure secure communication.
- Internet Gateway: Grants public subnets access to the internet.
- NAT Gateway: Allows private subnet to reach the internet without directly exposing it.
- Application Load Balancer (ALB): Balances incoming traffic to the EC2 instance.
- Install Terraform
- Install and configure AWS CLI
- AWS Account with sufficient permissions
- Clone the repository.
git clone https://github.com/Saddff2/Moveo_Assignment.git
cd Moveo_Assignment
- Deploy Infrastructure
terraform init
terraform apply
- Verify Deployment
Once the deployment is complete, access the public DNS of the Application Load Balancer (ALB) in your web browser. You should see the text “yo this is nginx” displayed.
- Clean Up
terraform destroy
- A deployed instance of the application accessible from the public.
- Dockerized Nginx that can run locally.
