IaC Tool ~ Terraform


Imagine you’re playing with building blocks. Every time you want a new castle, you take out your blocks and build the same thing again and again — by hand. That’s quite boring and tedious, right?
Now imagine if you had a magic notebook. Every time you drew a castle in the notebook — it appeared in real life exactly how you wanted. That’s what Infrastructure as Code (IaC) does — but for computers and servers!
You write how you want your digital playground like databases or networks to look, and the computer builds it for you. All by itself.
Infrastructure as Code (Iac)
IaC is the practice of managing and provisioning computing infrastructure through machine-readable configuration files, instead of manually setting up servers or networks.
With IaC, one can:
Automate infrastructure setup
Ensure consistency (no “it works on my machine” issues)
Version control infrastructure (just like code)
It replaces the old-school manual clicking in cloud dashboards with repeatable, testable code.
How Terraform Fits In
Terraform is like a universal remote for cloud infrastructure.
Think of a cloud provider (like AWS, Azure, or Google Cloud) as a LEGO city set.
Without Terraform: You go to the toy store (cloud dashboard), open the instructions, and build manually — every single time.
With Terraform: You create a shopping list and a blueprint, hand it to a robot, and say: "Build this." The robot handles the rest. Magic!
Terraform works by using .tf files, where you write:
What resources are needed (e.g., server, database)
How they should be configured
Dependencies and connections between them
And then Terraform makes sure your infrastructure matches that description.
Common Terraform Commands
terraform init
Initializes your project — sets up plugins, downloads providers. Get ready.
terraform plan
Shows what will happen if you run the code. Like a dry-run. What if we did this?
terraform validate
Checks for syntax errors in your files. Is this blueprint okay?
terraform apply # needs 'yes' for approval
terraform apply -auto-approve # no approval needed
Applies your changes and builds the infrastructure. Build it now.
terraform destroy # needs 'yes' for approval
terraform destroy -auto-approve # no approval needed
Tears everything down. Pack up and go home.
Thus, IaC with tools like Terraform is the future of modern infrastructure — fast, reliable, version-controlled, and way less error-prone than manual setup.
Subscribe to my newsletter
Read articles from Anshika Srivastava directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
