Create a reusable Terraform project that provisions a basic AWS VPC with public and private subnets using a clean infrastructure-as-code workflow.
Practice Terraform structure, providers, variables, outputs, and repeatable AWS network provisioning.
Create the Terraform file structure and configure the AWS provider.
Create main Terraform files
Configure AWS provider
Define variables for region and CIDR ranges
Provision the core VPC resources and subnet layout.
Create VPC resource
Create public subnet
Create private subnet
Attach Internet Gateway
Create and associate route tables
Make the project reusable and easier to review.
Define outputs for VPC and subnet IDs
Use variables for key values
Keep naming and tagging consistent
Run Terraform workflow and confirm the infrastructure exists in AWS.
Run terraform fmt
Run terraform init
Run terraform validate
Run terraform plan
Run terraform apply
Configure AWS provider.
Create VPC resource.
Add public and private subnets.
Define variables and outputs.
Run terraform init, plan, and apply.
terraform validate succeeds without errors
terraform plan shows expected resource creation
terraform apply completes successfully
AWS console shows the VPC and subnets
Outputs return the created resource IDs
Terraform project structure
Variables and outputs
README with architecture explanation
Plan/apply workflow documentation
Demonstrates practical IaC skills and the ability to provision AWS networking in a repeatable and structured workflow.
Hardcoding values instead of using variables
Forgetting route table association
Using overlapping subnet CIDRs
Not tagging resources consistently
Skipping terraform validate before apply
Split resources into Terraform modules
Add NAT Gateway for private subnet egress
Store remote state in S3 with locking
Add EC2 instance or ALB to use the network