DevOps · Infrastructure as code · Terraform 1.16.x aligned

Terraform Fundamentals

Learn infrastructure as code from first principles: HCL, providers and resources, typed inputs, expressions, stable instance identity, dependencies, state and locking, modules, refactoring, import, safe planning, validation, testing, security and collaborative workflows. The course uses the built-in terraform_data resource so every core lab can run without a cloud account.

My Learning progress

0% complete

0 of 12 curriculum modules completed · 0/12 currently published modules complete · 0 with lab + knowledge-check evidence.

Infrastructure as code mental model

Configuration → plan → reviewed change → state.

The provider-free labs isolate Terraform language and lifecycle mechanics first. Real cloud providers can then be introduced without confusing provider credentials with Terraform fundamentals.

Desired state

Configuration is reviewed intent

HCL
↓
terraform plan
↓
change evidence
Controlled apply

State tracks managed identity

approved plan
↓
terraform apply
↓
state + outputs
Course modules

Learn the language, state model and safety controls before cloud-specific recipes.

01

Infrastructure as code and the Terraform workflow

Understand declarative infrastructure as code, Terraform's desired-state model, and the init → plan → apply → destroy workflow before touching real cloud resources.

Open module →
02

HCL, providers, resources and addresses

Read Terraform configuration fluently, understand provider responsibilities, and reason about resource addresses without confusing names, types and remote object identifiers.

Open module →
03

Variables, locals, outputs and sensitive values

Parameterize configurations cleanly, derive reusable expressions with locals, expose intentional interfaces through outputs, and understand what sensitive actually protects.

Open module →
04

Expressions, collections, count and for_each

Use Terraform expressions and collection types deliberately, then choose stable resource instance keys instead of creating brittle index-based infrastructure.

Open module →
05

References, dependencies, data sources and the dependency graph

Understand how Terraform derives ordering from references, when explicit depends_on is justified, and how data sources differ from managed resources.

Open module →
06

State, backends, locking and collaboration

Treat Terraform state as protected operational data, understand backend responsibilities, and know why locking and recovery discipline matter for teams.

Open module →
07

Modules, version constraints and dependency locks

Design reusable modules with explicit interfaces, separate root and child module responsibilities, and use version constraints plus the provider dependency lock file deliberately.

Open module →
08

Lifecycle, refactoring, moved/removed blocks and import

Refactor Terraform addresses without unnecessary replacement, understand lifecycle controls, and bring existing infrastructure under management carefully.

Open module →
09

Planning, drift, saved plans and safe apply

Interpret plan actions, use detailed exit codes and saved plans in automation, and distinguish configuration changes from drift and refresh-only reconciliation.

Open module →
10

Validation, preconditions, checks and terraform test

Move infrastructure assumptions into executable validation using variable rules, lifecycle conditions, check blocks and Terraform tests.

Open module →
11

Security, team workflows and HCP Terraform

Apply least privilege to credentials, protect state and plan artifacts, separate speculative plans from privileged applies, and understand where HCP Terraform fits.

Open module →
12

Capstone: reusable, tested infrastructure module

Combine typed inputs, for_each, child modules, outputs, state, validation, checks and terraform test into one provider-free infrastructure-as-code delivery exercise.

Open module →
Prerequisites

Linux/shell and Git are enough to begin.

No AWS, Azure, GCP or HCP Terraform account is required for the core validator.

Linux / shell

Required for local labs and CLI workflows.

Git & GitHub

Recommended for reviewing infrastructure changes and module collaboration.

Cloud provider knowledge

Not required. Provider-specific credentials and APIs are intentionally separated from the fundamentals.

Knowledge assessment

Prove you understand Terraform state and change safety, not just HCL syntax.

The assessment selects 30 questions from an 84-question bank covering workflow, HCL/providers/resources, variables and expressions, state/backends/locking, modules, refactoring/import/lifecycle, and validation/testing/security/operations. Pass mark: 75%. Time limit: 35 minutes.

12 MODULES→30 RANDOM QUESTIONS · 35 MIN→PASS ≥ 75%→OPTIONAL CERTIFICATION

Maximum two attempts per 24 hours. Learning and assessment are free. A passing result enables the optional ₹499 GST-inclusive Certificate of Successful Completion pathway.

30 questions · 35 minutes · timer starts when the server creates the attempt · no pause

Course capstone

Compose a reusable, tested service catalogue and prove convergence.

Module 12 combines typed inputs, a reusable child module, for_each identity, checks, terraform test, a saved plan, apply and a final no-change plan — without requiring any external provider.

Validate→Test→Plan→Apply→Converge