run-all across many units
Apply a whole environment.
run-all is Terragrunt’s orchestration command: terragrunt run-all plan (or apply) executes the command across every unit under the current directory, in the dependency order Terragrunt computed from the dependency blocks. Point it at live/prod and it plans or applies the whole environment — vpc, then database, then app — in one command, respecting the graph. It is what makes many small units manageable as a unit.
$ cd live/prod$ terragrunt run-all plan # plan every unit, in dependency order$ terragrunt run-all apply # apply the whole environmentGroup 1: [vpc]Group 2: [database, cache] # applied after vpc, in parallel with each otherGroup 3: [app] # after its dependencies
Power and its caveats
run-all is powerful and, therefore, dangerous: run-all apply changes many units at once, and run-all destroy can tear down a whole environment. Terragrunt runs independent units in parallel for speed, which also means output interleaves. Use --terragrunt-include-dir / exclude to scope a run, always run-all plan and read it before run-all apply, and treat run-all destroy with extreme care behind confirmations.
$ terragrunt run-all plan --terragrunt-include-dir "app" # scope the run$ terragrunt run-all apply --terragrunt-non-interactive # (CI) — only after a reviewed plan