← Terraform & Infrastructure as Code learning path
Terraform & Infrastructure as Code · Module 2 of 10

Terraform basics

Write your first Terraform configuration.

📖 Key ideas

  1. Files end in .tf and use HCL (HashiCorp Configuration Language).
  2. Providers connect to platforms: aws, google, azurerm.
  3. Resources define things to create: resource "aws_s3_bucket" "site" { ... }.
  4. Workflow: terraform init → plan → apply → destroy.
  5. terraform fmt formats; validate checks syntax.
💡 Real-life example: Terraform is a contractor: you hand over the plan (.tf), it shows a quote (plan), then builds (apply).
HCLHashiCorp Configuration Language
ProviderPlugin for a platform API
ResourceInfrastructure object to manage
terraform applyMakes the changes