From Manual Clicking to Terraform Magic

Vikaskumar dane

From Manual Clicking to Terraform Magic: My Journey into Infrastructure as Code šŸš€

12 min read
22 hours ago

Chapter 1: The Plot Twist in My DevOps Journey

So there I was, thinking I was getting confidence at this whole DevOps thing. I learned Docker (well, mostly stopped getting ā€œcontainer not foundā€ errors), learned some basic AWS services, and could even write a halfway decent CI/CD pipeline without crying. I was feeling like a proper cloud warrior! šŸ³ā˜ļø
Then my senior developer casually mentioned, ā€œOh, and once you’re comfortable with those, you should probably learn Infrastructure as Code. Maybe start with Terraform.ā€
Record scratch šŸŽµ
Infrastructure as… what now? I thought infrastructure was just clicking around in the AWS console until things worked. You know, the classic ā€œpoint-and-prayā€ method that’s been serving humanity since the dawn of cloud computing (aka 2006).
But apparently, there’s this whole world of Infrastructure as Code (IaC) that I’d been blissfully unaware of. And let me tell you, discovering IaC after manually creating resources is like finding out you can order groceries online after years of fighting crowds at the supermarket. Mind = Blown 🤯

Chapter 2: The Manual Infrastructure Nightmare (A Horror Story)

Before we dive into the magic of IaC, let me paint you a picture of my pre-Terraform life. Picture this:
The Scene: 2 AM, I’m trying to create a ā€œsimpleā€ three-tier web application on AWS
The Process:
Log into AWS Console āœ…
Navigate to VPC (after getting lost in the sea of AWS services) āœ…
Create VPC with custom CIDR block āœ…
Create public subnet… wait, what’s an availability zone again? šŸ¤”
Create private subnet in a different AZ āœ…
Create internet gateway āœ…
Attach internet gateway to VPC… where’s that button? šŸ”
Create route table for public subnet āœ…
Associate route table with subnet āœ…
Create security groups… which ports did I need again? šŸ¤·ā€ā™‚ļø
Launch EC2 instance in public subnet āœ…
Launch RDS instance in private subnet āœ…
Configure security group rules (after googling ā€œwhat port does MySQL useā€ for the 47th time) āœ…
Test connectivity… nothing works 😭
Spend 3 hours debugging why the EC2 can’t reach the RDS šŸ›
Finally get it working at 5 AM āœ…
Two weeks later: ā€œHey, can you create the same setup for our staging environment?ā€
Internal screaming intensifies 😱
And that’s when I realized I had two options:
Repeat this 47-click nightmare and probably make different mistakes this time
Learn this ā€œInfrastructure as Codeā€ thing everyone keeps talking about
Spoiler alert: I chose option 2, and it changed my life! šŸŽ‰

Chapter 3: What the Heck is Infrastructure as Code?

So, Infrastructure as Code (IaC) is basically treating your infrastructure like… well, code! Instead of clicking through web interfaces like a digital caveman, you write code that describes what you want your infrastructure to look like, and tools automatically create it for you.
Think of it this way:
Traditional approach: Like giving someone directions to your house by phone (ā€œTurn left at the big tree, then right at the place that used to be a gas stationā€¦ā€)
IaC approach: Like sharing your GPS coordinates — precise, repeatable, and much less likely to end with someone calling you from a corn field

Why Do We Need IaC? (The Life-Changing Benefits)

1. Consistency šŸŽÆ Remember playing ā€œspot the differencesā€ between your dev and prod environments? With IaC, they’re identical every single time. No more ā€œbut it works on my staging environment!ā€ moments.
2. Version Control šŸ“ Your infrastructure changes go through the same review process as your application code. No more mystery configurations that only Bob from DevOps remembers (and Bob went on vacation to Thailand indefinitely).
3. Documentation šŸ“š The code IS the documentation! No more outdated wiki pages that say ā€œTODO: Document the network setupā€ from 2019.
4. Disaster Recovery šŸš‘ If something goes boom, you can recreate your entire infrastructure in minutes instead of frantically trying to remember what you clicked two months ago.
5. Cost Management šŸ’° Spin up environments when you need them, destroy them when you don’t. Your AWS bill will thank you (and so will your manager).
6. Collaboration šŸ¤ Multiple people can work on infrastructure changes without stepping on each other’s toes. It’s like Google Docs, but for servers!

Chapter 4: The IaC Tool Showdown (Choose Your Fighter)

When I started researching IaC tools, I felt like I was at a tech buffet with too many options. Here’s the breakdown of the major players:

Ansible šŸŽ­

What it is: Like having a really good assistant who follows step-by-step instructions
Good for: Configuration management, ā€œdo this, then do thatā€ scenarios
Not so good for: Describing what your final infrastructure should look like
Analogy: Like having a recipe that says ā€œstir for 2 minutes, add salt, stir for 3 more minutesā€

Puppet šŸŽŖ

What it is: The enterprise-grade, ā€œwe have a team of 50 DevOps engineersā€ solution
Good for: Large organizations with complex requirements
Not so good for: Small teams who just want to get stuff done
Analogy: Like using a Formula 1 car to go grocery shopping — technically impressive, but maybe overkill

Chef šŸ‘Øā€šŸ³

What it is: Ruby-based configuration management
Good for: Teams that love Ruby and have time to learn Ruby
Not so good for: Everyone else (sorry Ruby fans, but it’s true)
Analogy: Like cooking with molecular gastronomy when you just want a sandwich

AWS CloudFormation ā˜ļø

What it is: Amazon’s native IaC solution
Good for: All-AWS environments, tight integration with AWS services
Not so good for: Multi-cloud setups, or when you want readable configuration files
Analogy: Like speaking fluent AWS-ese but being mute everywhere else

Terraform šŸŒ

What it is: The Swiss Army knife of infrastructure tools
Good for: Pretty much everything, multi-cloud, readable syntax
Not so good for: …still looking for major downsides honestly
Analogy: Like having a universal translator for cloud services
Guess which one I chose? šŸ˜‰

Chapter 5: Why Terraform Won My Heart ā¤ļø

Terraform quickly became my favorite IaC tool, and here’s why:

The Origin Story šŸ“–

Terraform was created by Mitchell Hashimoto and Armon Dadgar at HashiCorp in 2014. The story goes that Mitchell was impressed by AWS CloudFormation but thought, ā€œWhat if we could do this for ANY cloud provider?ā€ So he literally blogged about the idea, waited for someone else to build it, and when nobody did, HashiCorp stepped up to the plate.
Thanks for your service, Mitchell! šŸ™

Why Terraform is Awesome

1. Cloud Agnostic 🌐 Works with AWS, Azure, Google Cloud, and about 1000+ other providers. You could probably use Terraform to manage your smart toaster if someone wrote a provider for it.
2. Declarative Syntax šŸ“ You describe WHAT you want, not HOW to get there. It’s like ordering at a restaurant — you don’t need to explain to the chef how to cook, you just say ā€œI want the salmon.ā€
3. State Management šŸ—ƒļø Terraform keeps track of what it created, so it knows what to update, what to leave alone, and what to destroy. It’s like having a really good memory for infrastructure.
4. Plan Before Apply šŸ” Terraform shows you exactly what it’s going to do before it does it. No more surprise charges on your AWS bill!

Get Vikaskumar Dane’s stories in your inbox

Join Medium for free to get updates from this writer.
5. Huge Community šŸ‘„ Thousands of modules, examples, and Stack Overflow answers. If you want to do something with Terraform, someone has probably already done it and shared how.

A Simple Terraform Example (The Magic Moment)

Here’s what made me fall in love with Terraform. This simple code:
# Configure the AWS Providerterraform {  required_providers {    aws = {      source  = "hashicorp/aws"      version = "~> 5.0"    }  }}provider "aws" {  region = "us-west-2"}# Create a VPCresource "aws_vpc" "main" {  cidr_block           = "10.0.0.0/16"  enable_dns_hostnames = true  enable_dns_support   = true  tags = {    Name = "main-vpc"  }}# Create a public subnetresource "aws_subnet" "public" {  vpc_id                  = aws_vpc.main.id  cidr_block              = "10.0.1.0/24"  availability_zone       = "us-west-2a"  map_public_ip_on_launch = true  tags = {    Name = "public-subnet"  }}# Create an internet gatewayresource "aws_internet_gateway" "gw" {  vpc_id = aws_vpc.main.id  tags = {    Name = "main-gateway"  }}# Create an EC2 instanceresource "aws_instance" "web" {  ami           = "ami-0c02fb55956c7d316" # Amazon Linux 2  instance_type = "t2.micro"  subnet_id     = aws_subnet.public.id  tags = {    Name = "web-server"  }}
Does the EXACT same thing as my 2 AM clicking marathon, but:
Takes 2 minutes to run instead of 2 hours
Is perfectly documented
Can be version controlled
Can be shared with teammates
Will create identical infrastructure every time
I literally said ā€œshut up and take my money!ā€ to my computer screen. šŸ¤‘ Although I don’t have it :-(

Chapter 6: What Can You Actually Do With Terraform?

The possibilities are endless! Here are some real-world scenarios where Terraform shines:

The ā€œOops, I Broke Productionā€ Recovery 🚨

# Instead of panic-clicking for 6 hours...$ terraform apply# 10 minutes later: "Production is back up!"

The ā€œLet’s Test This on a Copy of Productionā€ Request šŸ”„

# Before: "That'll take 2 weeks to set up"# After: "Give me 15 minutes"$ terraform workspace new testing$ terraform apply

The ā€œWe Need This in 3 Different Regionsā€ Challenge šŸŒ

# Copy-paste your configuration, change the region# Deploy to multiple regions simultaneously# Sleep peacefully knowing they're all identical

The ā€œIntern Accidentally Deleted Everythingā€ Disaster 😱

# Before: Resume updates and panic attacks# After: "No problem, let me just..."$ terraform apply# "...and it's back!"

The ā€œOur AWS Bill is Too Highā€ Investigation šŸ’ø

# Destroy non-production environments after hours$ terraform destroy -auto-approve# Recreate them in the morning$ terraform apply -auto-approve# Watch your AWS bill thank you

Chapter 7: Getting Started — Your First Steps

Ready to join the Terraform revolution? Here’s how to get started:

Installation (The Easy Part)

Windows 🪟:
Download from HashiCorp’s website
Extract to C:\terraform
Add to PATH
Pray to the PATH gods
Open new terminal and run terraform --version
macOS šŸŽ:
bash# The civilized waybrew install terraform# Verify it workedterraform --version
Linux 🐧:
# Download and installwget https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zipunzip terraform_1.6.0_linux_amd64.zipsudo mv terraform /usr/local/bin/# Check if you're now a Terraform wizardterraform --version

The Terraform Workflow (The Fun Part)

The Terraform workflow is beautifully simple:
Write šŸ“: Create .tf files describing your infrastructure
Init šŸš€: Run terraform init to download providers
Plan šŸ“‹: Run terraform plan to see what will happen
Apply āœ…: Run terraform apply to make it happen
Admire šŸ˜: Watch your infrastructure come to life
Destroy šŸ’„: Run terraform destroy when you're done (optional, but your wallet will appreciate it)

Chapter 8: The Learning Resources Goldmine šŸ†

Now that I’ve convinced you that Terraform is awesome (you’re welcome), here are the best resources to level up your skills:

šŸ“ŗ YouTube Channels (Free Knowledge FTW)

Hey there, caffeine connoisseur! If this article perked you up more than your morning espresso, feel free to fuel my next blog buzz —treat me to a coffee here
1. Terraform Zero to Hero By Abhishek.Veeramalla
Great for getting started quickly
Practical and to the point
2. Infrastructure as Code by Kunal Kushwaha

šŸ“š Official Documentation (The Source of Truth)

1. HashiCorp Learn Platform ⭐⭐⭐⭐⭐
Free, official tutorials from the creators
Step-by-step guides for AWS, Azure, GCP
Certification preparation materials
2. Terraform Documentation
Complete reference documentation
Best practices and examples
Provider-specific guides
3. AWS Provider Documentation
Every AWS resource you can imagine
Code examples for each resource
Real-world usage patterns

šŸ› ļø Hands-On Practice Platforms

1. Collabnix Terraform Labs ⭐⭐⭐⭐⭐
Free hands-on labs
Covers AWS, Azure, GCP
Step-by-step tutorials
Community-driven content
2. Whizlabs Hands-On Labs
Professional lab environment
Real AWS environments
Guided exercises
Certification-focused
3. K21Academy Practice Labs
Comprehensive activity guides
Real-world scenarios
Multi-cloud coverage

šŸ“– GitHub Resources (Community Power)

1. Terraform AWS Examples
Official AWS provider repository
Real-world examples
Community contributions
2. Awesome Terraform
Search GitHub for ā€œawesome-terraformā€
Curated list of resources
Tools, modules, and examples
Community-maintained

šŸ† Practice Tips from My Journey

Start Small: Begin with simple resources like S3 buckets
Use Free Tier: AWS/Azure/GCP free tiers are perfect for learning
Break Things: Seriously, destroy and recreate resources to understand the lifecycle
Join Communities: Reddit r/Terraform, Stack Overflow, Discord servers
Read Other People’s Code: GitHub is full of Terraform examples
Document Your Learning: Blog about what you learn (like I’m doing!)

Chapter 9: What’s Next in My Terraform Adventure?

Now that I’ve caught the Terraform bug, I’m planning my next learning adventure:

Coming Up Next: ā€œFrom Zero to EC2 Hero: Creating AWS Infrastructure with Terraformā€

In my next blog post, I’ll take you on a hands-on journey where we’ll:
šŸš€ Set up AWS Credentials Properly
AWS CLI configuration
IAM roles and policies
Security best practices (because we’re not animals)
šŸ—ļø Build a Production-Ready EC2 Setup
Custom VPC with public/private subnets
Security groups that actually make sense
Load balancers for high availability
Auto Scaling Groups for handling traffic spikes
šŸ’¾ Master Terraform State Management
Remote state with S3 backend
State locking with DynamoDB
Team collaboration workflows
šŸ”§ Advanced Terraform Techniques
Variables and outputs
Modules for reusability
Workspaces for multiple environments
Conditional resource creation
šŸŽÆ Real-World Project We’ll build a complete web application infrastructure that includes:
Application Load Balancer
Auto Scaling Group with EC2 instances
RDS database in private subnet
CloudWatch monitoring and alarms
All managed through Terraform code!
This will be a completely hands-on tutorial where you can follow along and build real infrastructure. By the end, you’ll have a portfolio-worthy project and the confidence to use Terraform in production environments.

Why This Matters

The next post will bridge the gap between ā€œI know what Terraform isā€ and ā€œI can confidently build production infrastructure with Terraform.ā€ It’s the difference between knowing how to drive and actually navigating through city traffic!

Chapter 10: Conclusion — Welcome to the IaC Revolution!

Looking back on my journey from manual infrastructure clicking to Terraform automation, I can’t believe I waited so long to learn Infrastructure as Code. It’s like discovering that you can automate your morning coffee routine — suddenly everything else seems barbarically manual! ā˜•

The Transformation

Before Terraform 😫:
2 AM infrastructure emergencies
ā€œIt works on my machineā€ syndrome
Documentation that’s always out of date
Fear of making changes
AWS bills that make you cry
After Terraform šŸ˜Ž:
Infrastructure that deploys in minutes
Identical environments every time
Code that IS the documentation
Confidence in making changes
Predictable, manageable costs

The Bigger Picture

Infrastructure as Code isn’t just about tools — it’s about bringing software engineering best practices to infrastructure management. It’s about:
Collaboration: Working together on infrastructure like we work on code
Reliability: Predictable, repeatable infrastructure deployments
Speed: Going from idea to production faster than ever
Quality: Peer reviews, testing, and version control for infrastructure
Innovation: Spending time on new features instead of infrastructure firefighting

Your Next Steps

If you’re where I was a few months ago — comfortable with Docker, learning cloud services, but managing infrastructure manually — I encourage you to take the leap into Infrastructure as Code. Here’s your action plan:
This Week: Install Terraform and follow the official ā€œGet Startedā€ tutorial
Next Week: Deploy your first AWS resources with Terraform
This Month: Build a complete project following my next blog post
Next Month: Start using Terraform for your real projects

A Personal Note

Learning Terraform has been one of the most rewarding parts of my DevOps journey. Not just because it makes me more productive (though it absolutely does), but because it represents a fundamental shift in how we think about infrastructure.
We’re no longer infrastructure operators clicking through web interfaces. We’re infrastructure developers, crafting code that creates and manages the platforms our applications run on. That’s pretty cool when you think about it! šŸš€

Join the Journey

I’m excited to continue sharing this journey with you. The world of Infrastructure as Code is vast and constantly evolving, and there’s always more to learn. Whether you’re just starting out or you’re a seasoned pro, we’re all in this together.
Drop a comment below if you’re starting your own Terraform journey — I’d love to hear about your experiences, challenges, and victories!
Until next time, happy terraforming! šŸŒāœØ
Ready to dive deeper? Follow along for my next post where we’ll get our hands dirty with AWS and build some seriously cool infrastructure with Terraform. The adventure is just beginning!
Like this project

Posted Oct 5, 2025

Transitioned to Infrastructure as Code using Terraform, enhancing efficiency and consistency.

Beginner's Guide to Container Foundations
Beginner's Guide to Container Foundations
Technical Blog on NFT's
Technical Blog on NFT's
Technical Blog on Medium.com  .
Technical Blog on Medium.com .
Blog  For Freelance Client from LinkedIn platform.
Blog For Freelance Client from LinkedIn platform.

Join 50k+ companies and 1M+ independents

Contra Logo

Ā© 2025 Contra.Work Inc