👷 The Terragrunt website redesign is Work In Progress! 👷For a list of outstanding TODOs see this.To give feedback, click here.
run
Usage
Run OpenTofu/Terraform commands against a stack of units.
Examples
Run a plan on each unit.
Terminal window
terragruntstackrunplan
Apply changes for each unit.
Terminal window
terragruntstackrunapply
Destroy all units.
Terminal window
terragruntstackrundestroy
The stack run * command allows users to execute IaC commands across all units defined in a terragrunt.stack.hcl file.
This feature facilitates efficient orchestration of operations on multiple units, simplifying workflows for managing complex infrastructure stacks.
Automatic stack generation
Before executing the specified command, the terragrunt stack run * command will automatically generate the stack by creating
the .terragrunt-stack directory using the terragrunt.stack.hcl configuration file.
This ensures that all units are up-to-date before running the requested operation.
Flags
--no-stack-generate
Disable automatic stack regeneration before running the stack commands.
When enabled, Terragrunt will skip automatic stack regeneration before executing the command.
This is useful when you want to run operations using the existing .terragrunt-stack directory without regenerating it, improving execution speed and avoiding unnecessary changes.