Infrastructure as Code (IaC) changes how we provision and manage cloud resources by defining infrastructure in declarative configuration files instead of clicking through the AWS Console manually. When teams rely on manual steps, environments drift over time, mistakes happen easily, and reproducing staging or production setups takes hours. IaC solves this with consistency, repeatability, version control in Git, and faster cleanup.
Terraform is a widely used IaC tool that lets you provision and manage infrastructure across cloud providers using code. Instead of telling AWS step by step how to click buttons, you describe the desired state in .tf files, and Terraform communicates with AWS APIs through the AWS Provider to make reality match your configuration.
A clean Terraform workflow follows five core phases:

  1. terraform init: Initializes the working directory and downloads required provider plugins.
  2. terraform validate: Checks that your configuration syntax and structure are valid.
  3. terraform plan: Shows an execution plan of what will be created, changed, or destroyed before making changes.
  4. terraform apply: Applies the planned changes to reach the desired infrastructure state.
  5. terraform destroy: Removes managed resources when you no longer need them, helping control costs. Here is a minimal example configuring the AWS provider in us-east-1:
terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 6.0" } } } provider "aws" { region = "us-east-1" } 

Setting up terraform -install-autocomplete and a shell alias like alias tf=terraform also makes everyday CLI work smoother as you move from basic setup into building real AWS resources.

terraform