Creating DRY Terraform Environments with Terragrunt

Lab Steps

lock
Creating a DRY Terraform Environment with Terragrunt

The hands-on lab is part of this learning path

Ready for the real environment experience?

DifficultyAdvanced
Time Limit40m
Students97
Ratings
5/5
starstarstarstarstar

Description

Using Terraform in multiple environments can fall prey to Copy/Paste syndrome, where Terraform code changes are copied back and forth between multiple repositories. This can work for small teams that are diligent at making sure the environments are in sync. But for large teams that require scalable configurations, this can quickly become unmanageable and prone to human error. Terragrunt can be used with version-controlled modules to create infrastructure code that eliminates unnecessary code to allow developers to focus on modifying just the values that matter.  

In this lab, you will use Terragrunt to create a development environment from production code by modifying a single file. 

Learning Objectives

Upon completion of this lab you will be able to:

  • Create reusable environments with modules and Terragrunt
  • Learn how to create local values in Terragrunt to use throughout child folder configurations

Intended Audience

This lab is intended for:

  • Individuals familiar with using Terraform and how to deploy resources
  • Anyone interested in learning how to use Terragrunt to increase Terraform effectiveness
  • Enterprises looking to scale their Terraform codebase

Lab Prerequisites

You should be familiar with:

  • Cloud Services
  • DevOps
  • Basic understanding of Terraform modules and variables
  • Basic understanding of Terragrunt and keeping remote state DRY

The following course and lab can be used to fulfill the prerequisites:

Environment before
PREVIEW
arrow_forward
Environment after
PREVIEW
About the Author
Students3780
Labs42
Courses1
Learning paths3

Luke currently serves as a Cloud Labs Developer at Cloud Academy. His background is infrastructure development using Terraform. He is an Azure DevOps Engineer Expert, Azure Administrator Associate, and HashiCorp Certified - Terraform Associate.

Covered Topics