0% found this document useful (0 votes)
31 views5 pages

Terraform

The document outlines a project where an NGINX server was deployed on AWS using Terraform, highlighting the process of automating cloud infrastructure through Infrastructure as Code (IaC). Key steps included creating network infrastructure, configuring security groups, deploying an EC2 instance, and verifying the deployment. The project served as an introduction to Terraform, demonstrating its ability to simplify and automate cloud deployments.

Uploaded by

wejiki8024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Terraform

The document outlines a project where an NGINX server was deployed on AWS using Terraform, highlighting the process of automating cloud infrastructure through Infrastructure as Code (IaC). Key steps included creating network infrastructure, configuring security groups, deploying an EC2 instance, and verifying the deployment. The project served as an introduction to Terraform, demonstrating its ability to simplify and automate cloud deployments.

Uploaded by

wejiki8024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Architecting AWS with Terraform

Overview

I recently worked on a project where I deployed an NGINX server on AWS using


Terraform. This project helped me explore the power of Infrastructure as Code (IaC)
by automating the process of creating and managing cloud infrastructure. It was a
great learning experience, and I wanted to share the process and key insights I
gained.

Project Steps

1. Create Network Infrastructure

• Set up a VPC with a CIDR block of 10.0.0.0/16.


• Created a public subnet to allow internet access.
• Attached an Internet Gateway for external connectivity.
• Defined a route table to route traffic through the Internet Gateway.

2. Configure Security Groups

• Allowed HTTP (port 80) and HTTPS (port 443) traffic.


• Allowed all outbound traffic for communication with external resources.

3. Deploy EC2 Instance

• Launched a t2.micro EC2 instance using an Ubuntu AMI.


• Configured a public IP for external access.
• Used a user-data script to automatically install and start NGINX.

4. Verify Deployment

• Used Terraform outputs to retrieve the public IP address.


• Accessed the NGINX default page by navigating to the public IP in a browser.

5. Clean Up Resources

• Used terraform destroy to safely delete the resources when they were no
longer needed.
Key Terraform Files

1. providers.tf - Configured the AWS provider and specified the Terraform version.
2. network.tf - Defined the VPC, subnet, internet gateway, and route table.

3. compute.tf - Provisions the EC2 instance and security group.


Conclusion
This project was a great introduction to using Terraform for automating cloud
infrastructure. It demonstrated how IaC tools like Terraform can simplify
deployment, making the process repeatable and reliable. While this project is just
the beginning, it’s given me a solid foundation for exploring more complex setups.

Feel free to check out the project and try it yourself by following the steps in the
repository!

You might also like