Free Online Course · Self-paced · Hands-on

Terraform Associate Certification Course

Free Terraform Associate (004) exam prep course covering the full HashiCorp blueprint, with hands-on labs on one Ubuntu VM and no cloud account needed.

  • 11 chapters
  • 51 lessons
  • ~20h
  • Beginner to Intermediate
  • Tested with Terraform 1.12.x
  • Updated Sep 2026
Terraform Associate Certification Course
By Last updated

About this course

This is a free, self-paced course that takes you from never having written HCL to being ready to sit the HashiCorp Terraform Associate (004) exam. The syllabus follows the published exam blueprint chapter by chapter, so nothing on the objectives list is left uncovered and nothing is padded out that the exam never asks about.

The part people usually struggle with is getting hands-on practice without a cloud bill. Every lesson here runs on one Ubuntu VM using the hashicorp/local, hashicorp/random, and Docker providers, so you can work through the whole course without an AWS, Azure, or GCP account. That is not a shortcut around the exam either: HashiCorp deliberately keeps provider-specific knowledge out of the Associate exam, so a local provider teaches the same workflow the exam tests.

If you are new to Terraform, work through the chapters in order, since later lessons build on the lab from Before You Begin. If you already use it, every lesson carries its own setup, so you can jump straight to state, modules, or HCP Terraform.

What you'll learn

  • Explain Infrastructure as Code, declarative workflows, and how Terraform manages multi-cloud infrastructure
  • Install Terraform on Ubuntu from the official HashiCorp apt repository and configure providers for local labs
  • Run the core workflow — init, fmt, validate, plan, apply, and destroy — with Docker and local providers
  • Write production-shaped HCL — variables, outputs, expressions, lifecycle rules, and validation blocks
  • Build and consume modules from local paths and the public Terraform Registry
  • Manage state, backends, locking, drift, import, and refactor with moved and removed blocks
  • Use HCP Terraform for remote operations, workspaces, variables, and governance concepts
  • Review commands and HCL patterns with the Terraform cheat sheet before the Associate exam

Who this course is for

  • Cloud and DevOps engineers who want Terraform fundamentals they can use at work, not just pass an exam with
  • Platform engineers standardising on Infrastructure as Code across more than one provider
  • Sysadmins moving from shell scripts and manual console changes to declarative infrastructure
  • Anyone booked on, or considering, the HashiCorp Terraform Associate (004) exam

Prerequisites

  • Comfortable Linux command line on Ubuntu — file editing, package install, and environment variables
  • One Ubuntu 26.04 LTS VM (24.04 supported) with 4 GiB RAM minimum and outbound HTTPS
  • Docker Engine for container provider labs — no AWS, Azure, or GCP account required for the core syllabus
  • Willingness to work through init, plan, apply, and destroy cycles in isolated working directories

Exam objectives covered

HashiCorp Terraform Associate (004) blueprint — 8 domains · official objectives

  1. Infrastructure as Code with Terraform

    • Explain what Infrastructure as Code is and why teams adopt it
    • Describe advantages of IaC patterns over manual infrastructure changes
    • Explain how Terraform supports multi-cloud, hybrid, and service-agnostic workflows
  2. Terraform Fundamentals

    • Install and constrain provider versions with the lock file
    • Describe how Terraform uses providers and multiple provider configurations
    • Explain what state is, why Terraform needs it, and how it maps to real infrastructure
  3. Core Terraform Workflow

    • Initialize a working directory and download providers
    • Format and validate configuration before planning
    • Generate and review execution plans, apply changes, and destroy managed resources
  4. Terraform Configuration

    • Use resource and data blocks, references, variables, outputs, and complex types
    • Write expressions, functions, count, for_each, and dynamic blocks
    • Manage dependencies, lifecycle rules, custom conditions, and sensitive or ephemeral values
  5. Terraform Modules

    • Source modules locally and from the public Registry
    • Pass inputs, read outputs, and constrain module versions
  6. Terraform State Management

    • Configure local and remote backends, state locking, and drift detection
    • Refactor resources with moved and removed blocks without unnecessary recreation
  7. Maintain Infrastructure with Terraform

    • Import existing infrastructure into Terraform management
    • Use verbose logging and structured troubleshooting for init, plan, and apply failures
  8. HCP Terraform

    • Run Terraform through HCP Terraform with CLI integration
    • Organize workspaces and projects, manage variable sets, and describe governance features

Versions and testing environment

Every command in this course was run on this stack

ComponentVersionNotes
Terraform 1.12.x Installed from the official HashiCorp apt repository
Ubuntu 26.04 LTS 24.04 LTS works for every lesson in the syllabus
Docker Engine 27.x Backs the container provider labs, so no cloud account is needed
Providers hashicorp/local, hashicorp/random, kreuzwerker/docker Chosen because the exam does not test provider-specific knowledge

Syllabus

11 chapters · 51 lessons · ~20h of reading

  1. 1 Before You Begin — Foundation and Lab SetupGet a working Terraform install and a lab layout that keeps each lesson isolated. 2 lessons · ~26 min
    1. Part 1 Terraform Lab Environment on Ubuntu 14 min read
    2. Part 2 Install Terraform on Ubuntu 12 min read
  2. 2 Infrastructure as Code with TerraformUnderstand what problem Terraform solves and how it talks to providers before you write any HCL. 2 lessons · ~22 min
    1. Part 3 What is Terraform? Infrastructure as Code Explained 10 min read
    2. Part 4 Terraform Architecture — How Terraform Works 12 min read
  3. 3 Terraform FundamentalsLearn the building blocks the rest of the course assumes: syntax, providers, version pinning, and state. 4 lessons · ~53 min
    1. Part 5 Terraform HCL Syntax and Configuration Files 11 min read
    2. Part 6 Terraform Providers: Configuration and Aliases 14 min read
    3. Part 7 Terraform Provider Version Constraints and Lock File 16 min read
    4. Part 8 Terraform State Explained 12 min read
  4. 4 Core Terraform WorkflowDrive the everyday loop end to end, from an empty directory through apply and destroy. 6 lessons · ~1h 17m
    1. Part 9 Terraform init Command 13 min read
    2. Part 10 terraform validate Command with Examples 12 min read
    3. Part 11 terraform fmt Command with Examples 12 min read
    4. Part 12 Terraform plan Command 15 min read
    5. Part 13 Terraform apply Command 13 min read
    6. Part 14 Terraform destroy Command 12 min read
  5. 5 Terraform ConfigurationWrite configuration that survives review: variables, outputs, expressions, loops, and guardrails. 14 lessons · ~3h 12m
    1. Part 15 Terraform Resources: resource Block with Examples 16 min read
    2. Part 16 Terraform Data Sources with Examples 15 min read
    3. Part 17 Terraform Resource References and Dependencies 12 min read
    4. Part 18 Terraform Variables: Types, tfvars and Precedence 15 min read
    5. Part 19 Terraform Output Values 10 min read
    6. Part 20 Terraform Local Values 9 min read
    7. Part 21 Terraform Data Types: List, Set, Map, Tuple and Object 11 min read
    8. Part 22 Terraform Expressions and Operators 14 min read
    9. Part 23 Terraform Functions with Examples 14 min read
    10. Part 24 Terraform count vs for_each 17 min read
    11. Part 25 Terraform Dynamic Blocks 11 min read
    12. Part 26 Terraform Lifecycle Meta-Arguments 14 min read
    13. Part 27 Terraform Validation, Preconditions, Postconditions and Check Blocks 16 min read
    14. Part 28 Manage Secrets and Sensitive Data in Terraform 18 min read
  6. 6 Terraform ModulesPackage configuration for reuse and pull trusted modules from the public Registry. 4 lessons · ~43 min
    1. Part 29 Terraform Modules: Create and Use Local Modules 10 min read
    2. Part 30 Terraform Registry Modules 9 min read
    3. Part 31 Terraform Module Inputs and Outputs 11 min read
    4. Part 32 Terraform Module Sources and Version Constraints 13 min read
  7. 7 Terraform State ManagementKeep state safe and accurate across a team with remote backends, locking, drift detection, and refactors. 6 lessons · ~1h 10m
    1. Part 33 Terraform Backends and Remote State 15 min read
    2. Part 34 Terraform State Locking 11 min read
    3. Part 35 Terraform State Commands 11 min read
    4. Part 36 Terraform Drift Detection and Refresh-Only Mode 10 min read
    5. Part 37 Refactor Terraform Resources with moved and removed Blocks 10 min read
    6. Part 38 Terraform Workspaces (recommended enrichment) 13 min read
  8. 8 Maintain Infrastructure with TerraformAdopt infrastructure Terraform did not create and debug runs when they fail. 3 lessons · ~1h 14m
    1. Part 39 Terraform Import: Import Existing Infrastructure 26 min read
    2. Part 40 Terraform Logging and Debugging 24 min read
    3. Part 41 Terraform Troubleshooting Guide 24 min read
  9. 9 HCP TerraformMove from local runs to managed remote execution with workspaces, variable sets, and governance. 5 lessons · ~1h 39m
    1. Part 42 HCP Terraform Tutorial: CLI and Remote Runs 24 min read
    2. Part 43 HCP Terraform Workspaces and Projects 21 min read
    3. Part 44 HCP Terraform Variables and Variable Sets 25 min read
    4. Part 45 Migrate Local Terraform State to HCP Terraform 16 min read
    5. Part 46 HCP Terraform Teams, Policies and Governance 13 min read
  10. 10 Advanced TerraformInspect, test, and automate configurations the way production teams do. 4 lessons · ~1h 31m
    1. Part 47 terraform console Command with Examples 23 min read
    2. Part 48 Terraform Graph and Dependency Visualization 12 min read
    3. Part 49 Terraform Test Framework 16 min read
    4. Part 50 Terraform CI/CD Pipeline with GitHub Actions 40 min read
  11. 11 Certification ResourcesRevise the whole syllabus from one page before exam day. 1 lesson · ~9 min
    1. Part 51 Terraform Cheat Sheet 9 min read

Hands-on labs

6 guided builds you run yourself

  1. Build the Ubuntu lab environment

    Set up isolated working directories on a single VM so each lesson can init, apply, and destroy without colliding with the last one.

  2. Run a full init, plan, apply, destroy cycle

    Take a configuration from empty directory to running resource and back, reading the plan output at each step.

  3. Refactor a configuration into a reusable module

    Pull a working configuration apart into a local module with typed inputs and outputs, then call it more than once.

  4. Move local state to a remote backend

    Migrate a local state file to HCP Terraform and run the same configuration remotely.

  5. Import infrastructure that Terraform did not create

    Bring an existing resource under management and reconcile the configuration with what is already running.

  6. Automate plan and apply in CI

    Wire the workflow into GitHub Actions so plans run on pull requests and applies run on merge.

Where to go after this course

Frequently Asked Questions

What changed between Terraform Associate 003 and 004?

HashiCorp replaced 003 with 004 in January 2026. The new exam tests Terraform 1.12, includes HCP Terraform content, and adds four topics: depends_on and create_before_destroy lifecycle rules, custom conditions, ephemeral values and write-only arguments, and organizing HCP Terraform workspaces and projects. If your study notes predate 2026, check them against those four first. A 003 certification stays valid until it expires.

What is the Terraform Associate exam format?

It is a one-hour, online-proctored, multiple-choice exam in English. HashiCorp lists the price as $70.50 USD plus local taxes, with no free retake, and the credential is valid for two years. These details change between exam versions, so confirm them on the official exam page before you book.

Do I need Terraform work experience before taking the exam?

No. HashiCorp asks for basic terminal skills and an understanding of on-premises and cloud architecture. It recommends professional experience but says practising the objectives in a personal demo setup can be enough, which is what the labs in this course give you.

How do I renew the Terraform Associate certification?

If you hold an unexpired 004 credential, you can either pass the Terraform Authoring and Operations Advanced exam, which also earns you the advanced badge, or retake the 004 exam starting six months before your expiry date. Both options extend your current expiration date. Once a credential has expired, the only route is to pass the current Associate exam again.

Is finishing this course enough to pass the exam?

It covers the full 004 blueprint, but treat the blueprint as the source of truth rather than this page. HashiCorp updates the objectives periodically, so check the current exam objectives before you schedule, and review the Terraform cheat sheet once you have worked through the syllabus.

Do I have to do the labs, or can I just read?

You can read, and you will pick up the vocabulary. You will not pick up the debugging instinct that comes from a plan showing a replacement you did not expect, which is the part that makes Terraform useful at work.

Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with 15+ years of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, networking, and security, delivering robust and efficient solutions for diverse projects.

  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security
  • Cloud Computing
  • Kubernetes
  • Linux
  • Ansible (software)