Menu

1 / 2

From Zero to AWS Infrastructure: My First Terraform Assignment

DEV Community·Prince Anani Selase·6 months ago
#4YAxraW1
#terraform#aws#iac#devops#subnet
Reading 0:00
15s threshold

Description: A hands-on walkthrough of provisioning a complete AWS network and EC2 instance using Terraform — VPC, subnets, routing, security groups, and more.

Infrastructure as Code changed the way I think about cloud resources. Instead of clicking through the AWS console, I can describe my entire environment in code, version it with Git, and reproduce it in minutes. This post walks through my first Terraform assignment — provisioning a real, working AWS environment from scratch.

What I Built

By the end of this project, Terraform had created the following resources in AWS:

Resource Name Details

VPC Terraform-vpc 10.0.0.0/16

Internet Gateway Terraform-igw Attached to the VPC

Public Route Table Terraform-public-rt Routes 0.0.0.0/0 → IGW

Public Subnet Terraform-public-subnet 10.0.1.0/24 , auto-assigns public IPs

Private Subnet Terraform-private-subnet 10.0.2.0/24 , no public IP

Security Group Terraform-ec2-sg Allows SSH (22) and HTTP (80) inbound

EC2 Instance Terraform-ec2 t3.micro , Amazon Linux 2,…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.