Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Terragrunt for DevOps: Scale Your Terraform Workflows
Rating: 4.4 out of 5(17 ratings)
153 students

Terragrunt for DevOps: Scale Your Terraform Workflows

Terragrunt 1.x hands-on: DRY Terraform and OpenTofu with units, stacks, catalogs, remote state and CI/CD pipelines.
Last updated 11/2026
English
English [Auto],

What you'll learn

  • Build DRY Terraform setups with Terragrunt 1.x units, root.hcl and include
  • Generate whole environments from terragrunt.stack.hcl, values and a component catalog
  • Manage remote state on S3 with backend bootstrap and use_lockfile locking
  • Wire units together with dependency blocks, mock outputs and run --all queues
  • Add quality gates and retries with hooks, tflint, Checkov and the errors block
  • Handle secrets with SOPS and age, and deploy across AWS accounts with iam_role
  • Run plan on pull request and apply on merge in GitHub Actions with OIDC
  • Migrate 0.x code to the 1.x CLI, troubleshoot, and switch the engine to OpenTofu

Course content

13 sections • 44 lectures • 2h 33m total length
  • Why Terragrunt3:37
  • Lab repo tour3:05

Requirements

  • Working knowledge of Terraform (resources, variables, modules, state)
  • A terminal on macOS, Linux or Windows (WSL) where you can install CLI tools
  • Optional: an AWS account for the four cloud labs (S3 backend, assume role, multi-account, GitHub OIDC). All other labs run offline
  • Optional: a GitHub account for the CI/CD section

Description

Terraform is simple with one environment. With dev, staging and prod across several accounts, the same backend blocks, provider blocks and variables get copied everywhere, and they drift. Terragrunt removes that duplication.

This course teaches Terragrunt 1.x (1.2) with Terraform 1.17, plus an OpenTofu 1.13 add-on. Every lecture has a lab in the public terragrunt-labs repository (start, solution, and checker folders). Most labs run offline with local providers, so you can practice without a cloud bill.

What you will build

  • Setup and CLI: pinned installs with mise, your first unit, and the 1.x run command and flags
  • Configuration: source, locals, inputs, built-in functions, generate blocks, hcl fmt, validate and render
  • DRY with include: root.hcl, merge strategies, multiple includes and an account / region / env / unit layout
  • Remote state: a local backend first, then S3 with backend bootstrap and lockfile locking, and directories versus workspaces
  • Dependencies: dependency blocks, mock outputs, run --all, find, list, the DAG, and safe scoping
  • Stacks and catalog: terragrunt.stack.hcl, values, stack generate and run, catalogs and scaffold
  • Hooks and errors: before, after and error hooks, lint gates, retry and ignore rules
  • Secrets and multi-account: SOPS with an age key, iam_role, and a multi-account layout
  • CI/CD: a GitHub Actions pipeline with OIDC that plans on pull request and applies on merge
  • Migration and troubleshooting: moving 0.x code to 1.x and reading what Terragrunt is doing
  • OpenTofu add-on and a capstone: dev and prod built from a catalog, CI-shaped

By the end you will have a multi-environment stack, a reusable catalog and a working plan and apply pipeline you can bring to your own team.

Who this course is for:

  • DevOps, platform and cloud engineers who run Terraform across several environments or accounts
  • Engineers who inherited a Terragrunt repo and want to understand and modernize it on 1.x
  • SREs and developers who want repeatable plan and apply pipelines for infrastructure