Deploying Your First Server with Terraform: A Beginner's Guide
Introduction Infrastructure as Code (IaC) is one of those concepts that sounds complicated until you actually try it. Instead of clicking through cloud consoles like a robot, you write code that do...

Source: DEV Community
Introduction Infrastructure as Code (IaC) is one of those concepts that sounds complicated until you actually try it. Instead of clicking through cloud consoles like a robot, you write code that does the clicking for you. Today, I'm sharing my experience from Day 3 of the 30-Day Terraform Challenge, where I deployed my first web server on AWS using Terraform. By the end of this guide, you'll have provisioned real infrastructure without touching a single console button. Well, maybe just your keyboard. What You'll Need Terraform installed (v1.0+) An AWS account (free tier works) AWS access keys (keep these safe!) Basic terminal skills Provider Block vs Resource Block Before we dive in, let's clarify the two most important Terraform concepts: Provider Block: provider "aws" { region = "eu-north-1" } The provider block tells Terraform which cloud platform to use. Think of it as introducing Terraform to your cloud provider and saying "we'll be working together." Resource Block: resource "aws