DevOps.Academy
CoursesCurriculumInterview prepPricing
◔My learningSign in
DevOps.Academy

Free, hands-on DevOps lessons. Made with care in India.

System status

Learn

All coursesLinux roadmapCurriculumInterview questionsCheat sheetsMy learning

Academy

PricingCertificates

Legal

PrivacyTermsContact

devops.rajeev.pro

course 07 · intermediate

Terraform

Describe infrastructure in code, review it in a PR, and apply it the same way every time.

Start lesson 1 →
Course quiz69 questions to test yourselfInterview questions36 questions with model answersCheat sheetThe whole course on one page, for revision
Level
Intermediate
Roadmap
17 stages · 59 topics ↓
Lessons
17 of 17 ready
Done by you
0/17 stages
Before this
Linux & Bash
Course quiz
69 questions →
Certificate
Preview →
before you start

The Terraform roadmap

Everything this course covers, in the order you'll learn it. Open a stage to see why it matters and jump to its lesson.

lesson ready coming soon done by you
  • Infrastructure as code
  • What Terraform is
01Introduction+Start here

Why clicking in the console doesn't scale.

Lesson 1: Infrastructure as code, and where Terraform fits →
  • Use cases
  • IaC vs config management
  • Installing
  • Syntax
02HCL+

The language every Terraform file is written in.

Lesson 2: HCL: the Terraform language →
  • Blocks & arguments
  • Types & expressions
  • Terraform Registry
03Providers+

How Terraform talks to AWS, GitHub, Cloudflare and the rest.

Lesson 3: Providers and version pinning →
  • Configuring providers
  • Version pinning
  • terraform init
04Project initialization+

Set up a working directory the right way.

Lesson 4: terraform init and the lock file →
  • Lock file
  • Resource behaviour
  • Lifecycle
05Resources+

The things you actually create, and how Terraform decides to change them.

Lesson 5: Resources: count, for_each and lifecycle →
  • count & for_each
  • depends_on
  • Input variables
  • .tfvars files
06Variables & outputs+

Make one config work for many environments.

Lesson 6: Variables, locals and outputs →
  • Locals
  • Outputs
  • Preconditions
  • terraform fmt
07Format & validate+

Cheap checks that catch mistakes before plan.

Lesson 7: fmt, validate and TFLint →
  • terraform validate
  • TFLint
  • What state is
  • Remote state & locking
08State+

The most important and most dangerous part of Terraform.

Lesson 8: State: Terraform's memory →
  • State best practices
  • state mv & import
  • terraform plan
09Plan, apply, destroy+

The everyday loop. Always read the plan.

Lesson 9: Plan, apply and destroy →
  • terraform apply
  • terraform destroy
  • Root vs child modules
  • Inputs & outputs
10Modules+

Reuse good infrastructure instead of copy-pasting it.

Lesson 10: Modules: reusable infrastructure →
  • Registry modules
  • Versioning
  • Data sources
11Data sources & templates+

Read existing infrastructure and render config files.

Lesson 11: Data sources, templates and provisioners →
  • templatefile()
  • Provisioners (and why to avoid them)
  • Workspaces
12Environments+

Keep dev, staging and prod separate and safe.

Lesson 12: Environments: workspaces or folders →
  • Folder per environment
  • GitHub Actions
  • GitLab CI
13CI/CD integration+

Plan on every PR, apply on merge. No more laptop applies.

Lesson 13: Terraform in CI/CD →
  • Jenkins
  • Plan on PR, apply on merge
  • terraform test
14Testing+

Prove a module works before others depend on it.

Lesson 14: Testing Terraform code →
  • Integration tests
  • Terratest
  • Splitting state
15Scaling Terraform+

What changes when there are hundreds of resources and many teams.

Lesson 15: Scaling Terraform: split state, Terragrunt, Infracost →
  • Terragrunt
  • Infracost
  • Secret management
16Security+

Keep secrets out of state and catch risky changes early.

Lesson 16: Terraform security: secrets, scanning and policy →
  • Policy as code (OPA, Sentinel)
  • Checkov & tfsec
  • VPC & networking
  • Load balancer & Auto Scaling
17Capstone project+

Build real AWS infrastructure end to end, with a free track that needs no AWS account.

Lesson 17: Capstone: AWS infrastructure with Terraform →
  • Remote state & environments
  • Free and cloud tracks
  • Cleanup
Course complete · ready for the next one

Stage order follows the community roadmap at roadmap.sh/terraform, trimmed to what DevOps work needs.