Terragrunt - Terraform Hooks
Automate your workflow by injecting custom scripts. We’ll use before_hook and after_hook to trigger actions like validation, code linting, or Slack notifications directly around your Terraform lifecycle events without wrappers.
Terragrunt - Bulk Operations
Deploy or destroy entire environments with one command. We’ll master terragrunt run-all, learning how to orchestrate parallel execution across dozens of modules while managing the blast radius of potential failures.
Terragrunt - The Dependency Graph
Visualizing deployment order is crucial. We’ll look at how Terragrunt builds a directed graph of your modules to determine exactly which resources must be created first, ensuring a crash-free deployment sequence based on your configuration.
Terragrunt - Mock Outputs
Terraform plans fail if a dependency hasn't been applied yet. We’ll use mock_outputs to fake temporary data, allowing you to generate valid plans for an entire stack even when the underlying resources don't exist yet (the "chicken and egg" problem).
Terragrunt - Explicit Dependencies
Pass data between isolated modules without copy-pasting. We’ll use the dependency block to read outputs from your VPC module and inject them directly into your App module, linking infrastructure dynamically across different state files.
Terragrunt - Path Helpers
Dynamic configuration requires knowing where you are. We’ll cover essential functions like find_in_parent_folders() and get_terragrunt_dir() that allow your code to automatically detect its location in the directory tree and adjust paths accordingly.
Terragrunt - Inheritance Patterns
Stop repeating yourself. We will master the include block to cascade settings from root configurations down to leaf modules, and use hidden _env directories to share common configurations across environments like Staging and Production.
Terragrunt - Standard Hierarchy
Organization is key to scale. We'll implement the industry-standard directory structure—Account, Region, and Environment—ensuring that your file system logically maps to your actual cloud footprint for easy navigation and security boundaries.
Terragrunt - The "Live" Repository Pattern
Separate your infrastructure code (modules) from your deployment configuration (live). We will explore how to keep your Terraform logic versioned in one repo while using a dedicated "Live" repo to define specific environments and reduce duplication.
Terragrunt - Managing Inputs
Forget maintaining fragile .tfvars files. We’ll use the inputs block to pass variables directly from Terragrunt to your modules, enabling you to define environment-specific values clearly while keeping your underlying Terraform code generic.