Skip to main content
In this lesson, we explore the skip attribute in Terragrunt: a powerful boolean flag that controls whether a specific module runs Terraform commands. By leveraging skip, you can conditionally bypass apply, destroy, and other operations—ideal for tailoring complex infrastructure workflows.

Why Use the skip Attribute?

  • Customize multi-module deployments without removing configuration
  • Temporarily disable modules under development or testing
  • Avoid unintentional changes in non-critical environments
The image shows a diagram with connected nodes and a flag, symbolizing a customized workflow. It includes the text "Customizes workflow" and a button labeled "Benefits."
Use the skip flag to control module execution dynamically, ensuring only ready and tested modules are deployed.

Key Considerations

  • Skipping critical modules can lead to incomplete infrastructure
  • Ensure dependencies are met before disabling a module
The image features a diagram with three stacked rectangles connected by arrows, accompanied by the text "Use it judiciously" and a button labeled "Considerations."
Never set skip = true on production-critical modules. Always verify dependencies to prevent configuration drift.

skip Attribute Options

Example: Skipping a VPC Module

Imagine you have a VPC module under development. To prevent Terraform from applying it, add skip = true in your terragrunt.hcl:
Running terragrunt apply:
Terragrunt detects skip = true and leaves the VPC unchanged.

Enabling the Module

When you’re ready to deploy, set skip to false or remove it:
Then run:
With skip disabled, Terragrunt proceeds to create the VPC as expected.

Watch Video