Add missing terragrunt commands: ValidateAll, RunAll, FormatAll, OutputListAll#1622
Merged
james00012 merged 2 commits intomainfrom Nov 20, 2025
Merged
Add missing terragrunt commands: ValidateAll, RunAll, FormatAll, OutputListAll#1622james00012 merged 2 commits intomainfrom
james00012 merged 2 commits intomainfrom
Conversation
d7c9023 to
50f36e9
Compare
50f36e9 to
94d5b98
Compare
0389eab to
71f9568
Compare
71f9568 to
cd27bb3
Compare
Add ValidateAll, OutputAll, RunAll, OutputListAll, and FormatAll functions with comprehensive tests. New Functions: - ValidateAll/ValidateAllE - runs terragrunt validate --all - OutputAll/OutputAllE - gets all stack outputs as a map - OutputListAll/OutputListAllE - gets list of all output variable names - RunAll/RunAllE - runs any terraform command with --all flag - FormatAll/FormatAllE - formats all terragrunt.hcl files Testing: - Added wrapper tests for all exported functions (both E and non-E variants) - All 28 exported functions now have complete test coverage - Updated README with usage examples
cd27bb3 to
690fade
Compare
denis256
approved these changes
Nov 19, 2025
Member
denis256
left a comment
There was a problem hiding this comment.
It would be great to add support for the new CLI commands as well, either in this PR or in a follow-up
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestFormatAll(t *testing.T) { |
Member
There was a problem hiding this comment.
It is failing on the new Terragrunt version after CLI redesign
TestFormatAll 2025-11-19T15:22:35Z logger.go:67: time=2025-11-19GMT15:22:35Z level=error msg=unknown command: "hclfmt". Terragrunt no longer forwards unknown commands by default. Use 'terragrunt run -- hclfmt ...' or a supported shortcut. Learn more: https://terragrunt.gruntwork.io/docs/migrate/cli-redesign/#use-the-new-run-command
https://terragrunt.gruntwork.io/docs/migrate/cli-redesign/#use-the-newly-renamed-commands
Contributor
Author
There was a problem hiding this comment.
Hmm interesting. Let me tackle this in a follow-up PR and I'll upgrade the terragrunt version to the latest one for the circleCI so it catches this as well going forward.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds missing terragrunt command wrappers to improve test coverage and flexibility:
Each function includes both wrapper and error-returning (E) variants with comprehensive test coverage.
Benefits
Test Coverage
All 28 exported functions now have complete test coverage (51 test functions total).
Breaking Changes
None - this PR only adds new functions without modifying existing APIs.