Skip to main content
RunBook Academy

automation · cloud · security

Terraform for Production Sysadmins

A production-first Infrastructure as Code course that takes a systems administrator from "I can run terraform apply" to "I can be trusted to operate Terraform against production infrastructure that controls hundreds of business-critical resources." Covers IaC foundations, HCL, providers, state, modules, environments, security, drift, CI/CD, policy, supply-chain, multi-account scale, troubleshooting, and recovery — under the central premise that Terraform provides enormous leverage and enormous blast radius.

Who this is for

  • Linux systems administrators moving into infrastructure provisioning
  • Infrastructure and platform engineers owning Terraform estates
  • DevOps engineers and SREs responsible for production IaC
  • Cloud engineers operating Terraform against AWS, Azure, GCP, Proxmox, or other environments
  • Ansible users moving from configuration to provisioning
  • Engineers preparing for shared infrastructure responsibility

Prerequisites

  • Comfortable administering Linux from the shell (users, packages, systemd, filesystems)
  • Working SSH knowledge: keys, agents, and basic troubleshooting
  • Basic Git usage: branches, commits, pull requests
  • No prior Terraform knowledge assumed

Other RunBook Academy courses

  • Linux — recommended. Terraform usually provisions Linux hosts and the state backend often lives on Linux infrastructure. The Linux course covers the shell, systemd, networking and storage the Terraform course then automates.
  • Ansible — recommended. Terraform and Ansible often co-exist. The Ansible course teaches the configuration-management half of the operational split; this course teaches the provisioning half and the integration lesson is shared.

What you'll be able to do

After completing this course, you should be capable of independently:

  • Explain why Terraform requires state and what happens when state is lost
  • Architect remote state, locking, and state boundaries for blast-radius control
  • Read and interpret a Terraform plan, including replacement and destruction
  • Refactor Terraform code without recreating production infrastructure
  • Use `moved` blocks and `terraform state mv` safely
  • Design modules as interfaces with useful inputs, validation, and outputs
  • Pin Terraform, providers, and modules to defend reproducibility
  • Recognise when Terraform-controlled IAM, networking, and stateful services are uniquely dangerous
  • Manage stateful resources with deletion protection, replacements, and preconditions
  • Implement saved plans, approvals, and CI/CD for production Terraform changes
  • Validate production changes against evidence, not just `terraform apply` success
  • Recover lost, corrupted, or wrong state without making the outage worse
  • Diagnose and recover from partial apply failures
  • Evaluate third-party module and provider supply-chain risk
  • Use short-lived credentials (workload identity, OIDC) and never hard-code secrets
  • Coordinate changes across multiple environments, accounts, and teams
  • Recognise when Terraform is the wrong tool and another approach is appropriate
  • Complete a capstone: a small production environment designed, deployed, validated, refactored, and recovered

Curriculum overview

36 planned parts · 218 lessons currently published.

Part I

Infrastructure as Code Foundations

Why IaC exists; declarative vs imperative provisioning; Terraform in the platform ecosystem; reproducibility, drift, and ownership.

8 lessons

Part II

Terraform Architecture

The CLI, Core, configuration, state, providers, plugins, and the dependency graph; what each component does and does not do.

7 lessons

Part III

Installing and Versioning Terraform

Official installation, version pinning, the dependency lockfile, and reproducible control environments.

7 lessons

Part IV

HCL: The Terraform Configuration Language

Blocks, arguments, expressions, types, conditionals, for expressions, functions, and readability of production HCL.

8 lessons

Part V

The Terraform Workflow

fmt, validate, init, plan, apply, destroy, output, console, show, and what each proves (and does not prove).

11 lessons

Part VI

Providers and the Provider Ecosystem

Provider plugin model, sources, versions, aliases, authentication, failures, and the supply chain.

9 lessons

Part VII

Resources, Data Sources, and count/for_each

Managed resources, CRUD lifecycle, attributes, computed values, replacement, data sources, and resource identity for multiple instances.

9 lessons

Part VIII

Dependencies and the Resource Graph

Implicit dependencies, explicit depends_on, the dependency graph, parallelism, and ordering.

6 lessons

Part IX

State: The Core Production Concept

Why state exists, what it contains, how it maps resource addresses to real infrastructure, and why it is the trust boundary.

7 lessons

Part X

State Operations: Read, Move, Remove, Import

Local state, remote state, state list/show/pull, state mv, state rm, import, moved blocks, and the production risks of each.

11 lessons

Part XI

State Security and Lifecycle

Sensitive data in state, encryption-at-rest, lifecycle.prevent_destroy, lifecycle.replace_triggered_by, and lifecycle.precondition.

8 lessons

Part XII

State Recovery and Backup

State versioning, backups, recovery procedures, and the production control for state loss.

7 lessons

Part XIII

Variables, Outputs, and Locals

Variable types, validation, sensitive values, precedence, outputs, locals, and how to design a clean interface.

9 lessons

Part XIV

Modules: Reusable Building Blocks

Module structure, interfaces, sources, versioning, and the production rules of module design.

9 lessons

Part XV

Environment Architecture and State Boundaries

How to design multi-environment estates; state boundaries as the unit of failure; workspaces, directories, and accounts.

11 lessons

Part XVI

Plan Review and Saved Plans

How to read a plan, what the symbols mean, saved plans, and the production review workflow.

8 lessons

Part XVII

Drift Detection and Reconciliation

How drift appears, how to detect it continuously, and the production rules for reconciling it.

9 lessons

Part XVIII

Troubleshooting and Recovery

State corruption, plan failures, provider failures, partial apply, and the production control for each.

6 lessons

Part XIX

Security: Credentials, Secrets, and Audit

Production credential patterns, secrets management, IAM, least privilege, and audit.

6 lessons

Part XX

Supply Chain: Providers and Modules

Provider provenance, dependency lock file, module sources, version pinning, and supply-chain risk.

6 lessons

Part XXI

Testing, Linting, and Static Analysis

terraform test, fmt, validate, lint, security scanning, and the layered validation model.

7 lessons

Part XXII

CI/CD for Production Terraform

Production pipeline design, plan artifacts, gated deploys, CI/CD credentials, and observability.

7 lessons

Part XXIII

Policy as Code

Production guardrails: OPA, Sentinel, Conftest, and policy enforcement patterns.

6 lessons

Part XXIV

Upgrading Terraform, Providers, and Modules

Terraform Core upgrades, provider upgrades, module upgrades, and the production control for each.

6 lessons

Part XXV

Migrations and Backend Changes

Backend migration, state migration, and importing existing infrastructure.

6 lessons

Part XXVI

Cloud and Platform Operations

Provider-neutral patterns for cloud, on-prem, and multi-cloud; Terraform + Ansible + Proxmox integration.

6 lessons

Part XXVII

Enterprise Scale: Multi-Team, Multi-Account

Multi-team, multi-account, multi-region; repositories, modules, and ownership at scale.

6 lessons

Part XXVIII

Disaster Recovery and Resilience

Backup, RPO/RTO, state DR, and the production control for asset recovery.

6 lessons

Part XXIX

Incident Response: The 3 AM Test

Troubleshooting during incidents, break-glass changes, and the production control for partial failures.

6 lessons

Part XXX

Capstone: A Production Terraform Estate

A multi-stage capstone that exercises every concept in the course, with failure injection and recovery.

0 lessons

Part XXXI

Final Assessment

Comprehensive theory and practical assessment of every production competency.

0 lessons

Part Labs

Hands-On Labs

Lab exercises across the course.

0 lessons

Part Runbooks

Operational Runbooks

Runbooks for production operations.

0 lessons

Part Checklists

Production Checklists

Checklists for production readiness.

0 lessons

Part Breakfix

Break/Fix Scenarios

Diagnostic and recovery exercises.

0 lessons

Part Final

Terraform Final Assessment

Comprehensive assessment.

0 lessons

Verified against

  • Terraform CLIv1.9.x· released 2026-05· verified 2026-08-12
  • OpenTofuv1.7.x· released 2026-04· verified 2026-08-12
  • HCLv2.0· verified 2026-08-12
  • bpg/proxmox providerv0.66+· verified 2026-08-12
  • hashicorp/local providerv2.5+· verified 2026-08-12
  • hashicorp/null providerv3.2+· verified 2026-08-12
  • hashicorp/random providerv3.6+· verified 2026-08-12
  • hashicorp/http providerv3.4+· verified 2026-08-12
  • Ubuntuv24.04 LTS· verified 2026-08-12
  • Debianv12 (Bookworm)· verified 2026-08-12