@@ -85,10 +85,13 @@ options := &terragrunt.Options{
8585### Non-Stack Commands
8686Work with standard terragrunt configurations (dependencies via ` dependency ` blocks):
8787
88+ - ` Init(t, options) ` - Initialize configuration
8889- ` ApplyAll(t, options) ` - Apply all modules with dependencies
8990- ` DestroyAll(t, options) ` - Destroy all modules with dependencies
9091- ` PlanAllExitCode(t, options) ` - Plan all and return exit code (0=no changes, 2=changes)
91- - ` Init(t, options) ` - Initialize configuration
92+ - ` ValidateAll(t, options) ` - Validate all modules
93+ - ` RunAll(t, options, command) ` - Run any terraform command with --all flag
94+ - ` FormatAll(t, options) ` - Format all terragrunt.hcl files
9295
9396### Stack Commands
9497Work with ` terragrunt.stack.hcl ` configurations:
@@ -99,6 +102,7 @@ Work with `terragrunt.stack.hcl` configurations:
99102- ` Output(t, options, key) ` - Get stack output value
100103- ` OutputJson(t, options, key) ` - Get stack output as JSON
101104- ` OutputAll(t, options) ` - Get all stack outputs as map
105+ - ` OutputListAll(t, options) ` - Get list of all output variable names
102106
103107## Examples
104108
@@ -180,6 +184,47 @@ func TestInfrastructureUpToDate(t *testing.T) {
180184}
181185```
182186
187+ ### Using RunAll for Flexibility
188+
189+ ``` go
190+ func TestCustomCommand (t *testing .T ) {
191+ t.Parallel ()
192+
193+ options := &terragrunt.Options {
194+ TerragruntDir: " ../modules" ,
195+ }
196+
197+ // Run any terraform command with --all
198+ terragrunt.RunAll (t, options, " refresh" )
199+
200+ // Verify state is current
201+ output := terragrunt.RunAll (t, options, " show" )
202+ assert.Contains (t, output, " expected-resource" )
203+ }
204+ ```
205+
206+ ### Validating Output Keys
207+
208+ ``` go
209+ func TestOutputKeys (t *testing .T ) {
210+ t.Parallel ()
211+
212+ options := &terragrunt.Options {
213+ TerragruntDir: " ../stack" ,
214+ }
215+
216+ terragrunt.ApplyAll (t, options)
217+ defer terragrunt.DestroyAll (t, options)
218+
219+ // Get list of all output keys
220+ keys := terragrunt.OutputListAll (t, options)
221+
222+ // Verify required outputs exist
223+ assert.Contains (t, keys, " vpc_id" )
224+ assert.Contains (t, keys, " subnet_ids" )
225+ }
226+ ```
227+
183228## Not Supported
184229
185230This module does ** NOT** support:
0 commit comments