Course contentsShow
← Software Engineering
Lesson 1481 of 1,93343. Infrastructure as CodeFree lesson

Introduction to Terraform

Overview of Terraform as a declarative, cloud-agnostic infrastructure provisioning tool using HCL syntax.

Introduction to Terraform

You'll learn what Terraform is and why it's a leading tool for managing infrastructure declaratively across multiple cloud providers.

What is Terraform?

Terraform is an open-source Infrastructure as Code (IaC) tool created by HashiCorp that lets you define and provision infrastructure using declarative configuration files. Instead of clicking through cloud provider consoles or writing imperative scripts, you describe what infrastructure you want, and Terraform figures out how to create it.

Key Characteristics

Cloud-Agnostic

Unlike cloud-specific tools (AWS CloudFormation, Azure ARM templates), Terraform works across multiple providers—AWS, Azure, Google Cloud, Kubernetes, and even services like GitHub or Datadog. You use the same workflow and language regardless of where you're deploying.

Declarative Configuration

You describe your desired infrastructure state in files. Terraform compares this to the current state and creates a plan to make them match—this is idempotent provisioning in action.

HashiCorp Configuration Language (HCL)

Terraform uses HCL, a human-readable syntax designed specifically for infrastructure. It's more approachable than JSON or YAML for complex infrastructure definitions, supporting variables, modules, and expressions.

Why Terraform Matters

Think of Terraform as a universal translator for infrastructure. Just as you learned that declarative IaC tells the system what you want (not how to build it), Terraform embodies this philosophy while remaining portable. You can manage an entire multi-cloud architecture from a single codebase, version it in Git, and treat infrastructure changes like code reviews.

Key Takeaway: Terraform is a declarative, cloud-agnostic infrastructure provisioning tool that uses HCL syntax to define infrastructure as code, enabling consistent, repeatable deployments across multiple platforms.