Source: Dev.to | Dec 22, 2025 (UTC)
Today marks the beginning of my #30daysofawsterraform challenge! I spent Day 01 diving into the fundamentals of Infrastructure as Code (IaC) with Piyush Sachdeva.
If you’ve ever spent hours clicking through the AWS Console only to realize you made a typo in a security group, this journey is for you.
📺 Reference Video
🏗️ What is Infrastructure as Code (IaC)?
In simple terms, IaC is the process of managing and provisioning your technology stack through software (code) rather than manual hardware configuration or interactive configuration tools.
Piyush explained a scenario that really hit home: The Scalability Trap.
Manual Setup: Provisioning a 3-tier app (Web, App, DB) takes ~2 hours.
The Problem: In an enterprise, you need multiple environments (Dev, SIT, QA, Prod).
The Math: 2 hours x 6 environments = 12 hours of manual clicking!
Eliminating Configuration Drift: Manual setups lead to “it works in Dev but not in Prod.” Terraform ensures every environment is an exact replica of the code.
The Power of Git: Because infrastructure is code, we can store it in GitHub. This gives us a history of every change made to our cloud.
Speed: With one command, we can spin up or destroy entire environments. This is a lifesaver for saving costs on non-prod environments.
Since I am using a Linux machine for this challenge, I spent today getting my environment ready. Here is how I set up Terraform:
- Installation (Ubuntu/Debian) I followed the official HashiCorp steps to add the repository and install the CLI:
# Install dependencies sudo apt-get update && sudo apt-get install -y gnupg software-properties-common # Add HashiCorp GPG key wget -O- https://apt.releases.hashicorp.com/gpg | \ gpg --dearmor | \ sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg # Add the repository echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ sudo tee /etc/apt/sources.list.d/hashicorp.list # Install Terraform sudo apt-get update && sudo apt-get install terraform
Enter fullscreen mode
Exit fullscreen mode




Залишити відповідь