Posts

Day 26 -Terraform Cloud and Workspace Management

Image
For Day 26 of my AWS Terraform learning journey, I explored HCP Terraform Cloud and workspace management. Until now, most of my Terraform projects were executed from my local machine. I used local state in the beginning and later moved to an S3 remote backend with state locking. That approach works well, especially for AWS based projects, but Terraform Cloud gives a more centralized way to manage Terraform runs, remote state, variables, logs, and collaboration. The goal of this project was to understand how Terraform Cloud works in a practical setup. I created a Terraform Cloud account, created a workspace, connected Terraform CLI to the workspace, and deployed a small AWS environment using Terraform. Architecture The architecture for this project is simple. A developer runs Terraform commands from the local machine. Terraform CLI connects to the Terraform Cloud workspace. Terraform Cloud manages the run, stores state remotely, and provisions AWS resources using the AWS provider. ...

Day 25 - Terraform Import for Existing AWS Resources

Image
Today I worked on Terraform import as part of Day 25 of my AWS Terraform learning series. In real projects, not every AWS resource starts from Terraform. Some resources are created manually from the AWS Console. Some are created by older scripts. Some are created by different teams before Infrastructure as Code is adopted. Terraform import helps bring those existing resources into Terraform state so they can be managed going forward. For this project, I created a few AWS resources manually first, then imported them into Terraform. What I Built I used three existing AWS resources: S3 bucket EC2 instance Security group These resources were created outside Terraform first. Then I wrote Terraform configuration blocks for them and used terraform import to connect those real AWS resources to Terraform state. Architecture The workflow is simple: Existing AWS resources already exist in the AWS account. Terraform configuration defines matching resource blocks. terraform import m...

Day 24 - Highly Available and Scalable Django Application on AWS using Terraform

Image
Today I worked on deploying a highly available and scalable Django application on AWS using Terraform. The goal of this project was to understand how production-style AWS infrastructure is designed across multiple Availability Zones while keeping the application secure, scalable, and resilient. Instead of deploying a single EC2 instance in a public subnet, this setup used private EC2 instances behind an Application Load Balancer. The infrastructure also included Auto Scaling Groups, NAT Gateways, route tables, security groups, and multi-AZ networking. Architecture Overview The infrastructure was deployed inside a custom VPC across two Availability Zones. Main components used: VPC with public and private subnets Internet Gateway NAT Gateways for outbound internet access Application Load Balancer Private EC2 instances Auto Scaling Group Dockerized Django application Terraform Infrastructure as Code VPC and Networking Design The VPC CIDR block used was: 10.0.0.0/...