
Why should you consider adding Terragrunt to your IaC stack?
Explore three Terragrunt installation methods for Linux and macOS: system package managers, downloading the binary from GitHub, and the Homebrew approach, with notes on version management challenges.
Explore why and how to manage multiple versions of Terragrunt and Terraform to accommodate dependencies, environment isolation, dev to prod rollouts, and legacy systems.
Learn three ways to install and switch versions of a tool: Homebrew installation, a script with sudo for /usr/local/bin, and direct GitHub releases, then verify by checking versions.
Explore how to manage multiple Terraform and Terragrunt versions using switch. See how symlinks and cached downloads let you switch quickly, including semi-automatic switching from project configuration.
Terragrunt runs Terraform under the hood, enabling a basic setup that mirrors Terraform operations and demonstrates module sources, inputs, outputs, and a simple file resource.
Demonstrates a terragrunt basic setup using a simple module and environment with terraform, showing a local file resource, input and outputs, and an easy apply workflow.
Explore Terragrunt blocks like Terraform, remote state, include, dependency, dependencies, generate, locals, and inputs, and learn how to configure sources, dynamic generation, and module dependencies to keep Terraform dry.
Follow the terragrunt flow as it wraps terraform, copies the current directory into a cache, generates configuration, and exports inputs as environment variables before running terraform and updating remote state.
Learn how to keep your Terraform and Terragrunt code dry by using modules to reuse components, centralizing remote state configuration, extracting common environment settings, and standardizing command line flags.
Explore keeping Terraform code DRY with Terragrunt in a live demo, applying app, database, and load balancer modules across dev and prod environments.
Extract common state, provider, and module inputs into shared common configs; use environments.yaml and yaml decode to inject environment-specific values, while local inputs override shared ones for all environments.
Keep your Terraform CLI configuration DRY with Terragrunt by centralizing extra arguments, environment variables, required and optional var files, and organizing the setup for clarity.
Terragrunt hooks enable before, after, and error actions triggered around plan, apply, and destroy; define unique hook names and attach custom scripts to run, log, or notify during Terraform operations.
Apply the fmt command to automatically format Terragrunt code recursively from the root directory, align lines, and keep changes in place, enabling clean code and CI/CD integration.
Enable automatic retry in Terragrunt to handle transient errors during provider installation, module downloads, or remote host connections, with configurable retry max attempts and retry sleep interval.
Discover how to run all Terragrunt modules in a single batch to manage entire environments, speed up plan and apply, and observe dependency flows across database, application, and load balancer.
Use Terragrunt to keep Terraform code dry by centralizing module configurations and per-module remote state, with dynamic provider generation across dev, int, and prod environments to reduce copy-paste.
Keep your Terragrunt architecture dry by extracting common module configuration into a directory, then include it from dev and prod environments, focusing on Terraform source and inputs to reduce duplication.
Keep your Terraform CLI arguments dry by moving parameters into environment files, enabling prod-specific tuning like extended log timeouts, and composing global or per-environment configurations for all modules.
Demonstrate before, after, and error hooks in Terragrunt, applied to init, plan, and apply, including simple echo notifications and error handling options.
Perform a live Terragrunt demo showing three independent localhost environments (dev, int, prod) using a common module and environment file, executing init, plan, and apply with hooks across dockerized instances.
Understand how AWS costs can accumulate, learn about the free tier and always free resources, and follow best practices to shut down instances and remove unused resources.
Learn how to organize AWS resources as code with Terraform modules, including a bastion host, nginx instance, S3 bucket, and module dependencies across dev and prod environments.
Learn to keep your Terraform code dry with Terragrunt by modularizing AWS resources, setting up S3 state, roles, SSH keys, security groups, and reusable configurations across dev, int, and prod.
Learn to keep dependencies dry by using Terraform's dependency blocks to pass module outputs (security group IDs, bucket names) between modules, making configs dynamic and reducing manual input.
Deploy and manage AWS infrastructure across dev, int, and prod with Terragrunt run-all, using dependency blocks to restrict Nginx access to a Bastion host and orchestrate multi-environment provisioning.
Welcome to my course on Terragrunt!
We are going to learn how to maintain our Terraform code in better way. We will focus on how to work on Terragrunt modules, extract common parts for provider, remote state and modules itself. We will start with the basics, understand blocks that we have inside the Terragrunt. We will use some built-in functions. After that we are going to focus on why and how move to the next level, so called DRY approach (Don't repeat yourself approach).
We will do live examples for:
- Plain Terraform (aka dummy modules and environments just to look around)
- Hashicorp Vault setup
- AWS setup
Streamline Your Terraform Workflows with Terragrunt!
Learn how to eliminate repetitive code, manage complex infrastructures, and scale your Terraform projects effortlessly. This course will teach you to leverage Terragrunt's powerful features to keep your Terraform configurations DRY (Don't Repeat Yourself) and maintainable across multiple environments. Perfect for DevOps and Cloud Engineers looking to optimize their infrastructure as code practices.
I truly believe that with examples in the course and knowledge I'm going to pass over to you - you will be able to apply it to any environments you are currently maintain. Example is this course are related to AWS and Vault, but approaches presented here are relative to any cloud or provider that you are using.
Disclamer:
This course is not going to learn you how to work with Terraform basics. It learns you how to leverage your Terraform skills with Terragrunt wrapper and Gruntwork team mindset.
I hope you will enjoy it and level up your infrastructure as a code!