This week, I put theory into practice by provisioning a complete AWS infrastructure using Terraform, and I’m excited to share the experience!
Here’s what I built:
✅ A custom VPC with a defined CIDR block
✅ Public & Private Subnets to simulate real-world architectures
✅ An Internet Gateway attached to the VPC
✅ A Route Table with proper route configuration to enable internet access
✅ Security Groups with specific inbound/outbound rules (SSH & HTTP)
✅ And finally, I launched an Ubuntu EC2 Instance, linked it to the public subnet and associated it with the security group
📌 How I did it:
◾ Broke down my Terraform files into manageable modules: vpc.tf, subnet.tf, igw.tf, route_table.tf, security_group.tf, and instance.tf and also created terraform files to launch the Ubuntu EC2 Instance Instance.tf, Secgrp.tf, Keypair.tf, InstID, Provider.tf
◾ Applied the principle of separation of concerns for clean and readable infrastructure code
◾ Used terraform apply to provision the entire infrastructure in minutes!
💡 What you can take away from this:
➡️ You don’t need to click around the AWS console to build infrastructure
➡️ Infrastructure as Code is a must-have skill for anyone pursuing DevOps or Cloud Engineering
➡️ Start small, break it down, and build as you learn!
I’m looking forward to building even more advanced projects as I grow in this journey! 🌍🔧
Find below for the Github Repository
https://lnkd.in/d3KbvCuA