DevOps Peach

Advanced Terraform

Advanced Terraform: a free DevOps track with 5 modules and 21 lessons. Write Terraform that other people can reuse: small modules with clear inputs and…

Practice interactively →

Modules

  1. 01 Modules and Code Structure

    Write Terraform that other people can reuse: small modules with clear inputs and outputs, pinned module and provider versions with a committed lock file, count, for_each, dynamic blocks and lifecycle rules, and typed variables with validation and pre/postconditions.

  2. 02 State and Teamwork

    Understand what the state file holds and why it is sensitive, move it to a remote S3 backend with locking (on LocalStack), refactor addresses with moved and removed blocks instead of destroying, and split large states while sharing outputs safely.

  3. 03 Environments, Import and Drift

    Run the same code for dev, staging and prod with workspaces or separate folders, know which variable value wins, bring existing resources under management with import blocks, and catch drift with refresh-only plans, scheduled checks and check blocks.

  4. 04 Testing and CI/CD

    Catch problems before apply: formatting, validation, linting and security scans; unit and integration tests with terraform test and mock providers; a pull-request pipeline that plans, reviews and applies a saved plan; and policies that check the plan as code.

  5. 05 OpenTofu, Terragrunt and Security

    Keep secrets out of state and logs with sensitive, ephemeral and write-only values, know what OpenTofu changes and how to migrate, remove boilerplate across many environments with Terragrunt, and run Terraform at scale with provider aliases, multiple accounts and safe performance settings.