Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Decoupling Terraform using Terragrunt (Localhos...

Decoupling Terraform using Terragrunt (Localhost 2022 Talk)

This deck is centered on how to decouple Terraform infrastructure-as-code using Terragrunt

Avatar for Promise Chukwuenyem

Promise Chukwuenyem

October 30, 2022

Other Decks in Technology

Transcript

  1. Decoupling Terraform using Terragrunt How to decouple Terraform infrastructure-as-code using

    Terragrunt Promise Chukwuenyem, Senior DevOps Engineer at Sparkle Twitter/GitHub/LinkedIn @PromisePreston
  2. Sparkle is a digital bank with a license from the

    Central Bank of Nigeria. Sparkle is built with the purpose of helping you integrate your lifestyle with finances. Saving without thinking, scheduling your payments so you never let your dependents down, removing unnecessary steps to do what you want to do. Sparkle offers an all-inclusive, simple, and transparent experience. Think Money, think Sparkle. A financial and lifestyle ecosystem that lives in your Phone. Unlike the traditional banks you can carry out all the necessary transactions and actions you need to do right from your app without the need to visit the bank. About Sparkle https://sparkle.ng/
  3. Our focus What you will learn: 1. The evolution of

    the cloud? 2. Why Infrastructure As Code? 3. Getting started with Terraform 4. Why Terragrunt? 5. How to decouple Terraform using Terragrunt?
  4. Before the advent of the cloud we had companies running

    their workloads on-premise were the infrastructure hardware and software applications that are hosted on-site. • Infrastructure-as-a-service (IaaS) • Platform-as-a-service (PaaS) • Software-as-a-service (SaaS) • Artificial Intelligence • Machine learning and many others. A brief of the Evolution of the Cloud
  5. Terragrunt is a thin wrapper that provides extra tools for

    keeping your configurations DRY, working with multiple Terraform modules, and managing remote state. It allows you to define your Terraform code once and to promote a versioned, immutable “artifact” of that exact same code from environment to environment. There are multiple use cases for Terragrunt: • Keeping your Terraform code DRY • Keeping your remote state configuration DRY • Keeping your CLI flags DRY • Executing Terraform commands on multiple modules at once • Working with multiple AWS accounts Why Terragrunt
  6. Keep your Terraform Code DRY Using Terragrunt to keep your

    Terraform Code DRY to reduce code duplication Keep your remote state configuration DRY Using Terragrunt to keep your Terraform remote state DRY to reduce code duplication Execute Terraform Commands on Multiple Modules at once Using Terragrunt to execute Terraform commands on multiple modules at once Scenarios/Use Cases This is the GitHub repository for the talk - https://github.com/promisepreston/terraform-terragrunt For more on Terragrunt, you can read the documentation here - https://terragrunt.gruntwork.io/docs/