Skip to main content
HashiCorp 🔒 Pro

Terraform — Hands-On

Learn every Terraform feature by building real infrastructure.

⏱ ≈ 5.8 hours 📚 18 modules 🧪 9 hands-on labs

🔒 This course is included with Pro, a B2B seat, or the Ultimate pack for this exam.

See options to unlock →

Course modules

  1. 1

    Infrastructure as Code & what Terraform is

    Why IaC, declarative vs imperative, Terraform vs alternatives, the provider model.

  2. 2

    The CLI workflow: init, plan, apply, destroy

    Hands-on with the core loop. First real apply against the lab.

    🧪 Lab
  3. 3

    HCL language fundamentals

    Blocks, arguments, types, expressions, string interpolation, comments.

  4. 4

    Input variables & validation

    Declaring variables, types, defaults, sensitive, validation blocks, -var / tfvars.

    🧪 Lab
  5. 5

    Resources & data sources

    Managing resources; reading existing infra with data sources; resource addressing.

    🧪 Lab
  6. 6

    Output values

    Exposing values, sensitive outputs, and passing values between modules.

  7. 7

    Local values, expressions & built-in functions

    locals, for expressions, conditionals, and the function library.

    🧪 Lab
  8. 8

    Meta-arguments: count, for_each, depends_on, lifecycle

    Multiplying resources, explicit dependencies, and lifecycle controls.

    🧪 Lab
  9. 9

    Dynamic blocks

    Generating repeated nested blocks from collections.

  10. 10

    Modules: authoring & consuming

    Module structure, inputs/outputs, sources, versioning, the registry.

    🧪 Lab
  11. 11

    State fundamentals & remote backends

    What state is, why it exists, local vs remote, locking, the S3 backend.

  12. 12

    State operations: import, mv, rm, refresh

    Manipulating state safely; importing existing resources.

    🧪 Lab
  13. 13

    Provisioners & connections

    local-exec, remote-exec, when to use them (and why sparingly).

  14. 14

    Workspaces

    Multiple state instances from one config; workspace vs directory separation.

    🧪 Lab
  15. 15

    Provider configuration: aliases & versions

    Multiple provider instances, version constraints, required_providers.

  16. 16

    HCP Terraform (Terraform Cloud)

    Remote runs, remote state, VCS-driven workflow, private registry.

  17. 17

    Testing, validation & security

    fmt, validate, tflint, tfsec/checkov, and terraform test.

  18. 18

    Troubleshooting & best practices

    TF_LOG, common errors, state drift, project layout conventions.

    🧪 Lab