feat: Add terragrunt stack clean command and improve module#1582
Merged
james00012 merged 2 commits intomainfrom Aug 21, 2025
Merged
feat: Add terragrunt stack clean command and improve module#1582james00012 merged 2 commits intomainfrom
james00012 merged 2 commits intomainfrom
Conversation
- Add terragrunt stack clean command to remove .terragrunt-stack directory - Refactor to eliminate code duplication between stack and regular commands - Replace 'Terragrunt' with 'Tg' in comments for consistency - Add comprehensive tests for stack clean functionality - Improve code organization with unified executeTerragruntCommand function
- Add TgInit and TgInitE as general terragrunt init functions - Update all tests to use TgInit instead of TgStackInit for clarity - Rename initStackArgs to initArgs to match new function names
denis256
approved these changes
Aug 20, 2025
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
This PR enhances the terragrunt module with the missing
stack cleancommand and improves code maintainability through refactoring.Changes
terragrunt stack cleancommand: Implements the last missing stack subcommand to remove the.terragrunt-stackdirectoryTgInitfunctions: Provides general terragrunt init functions alongside stack-specific onesexecuteTerragruntCommandfunctionTesting
All existing tests pass. New tests added for stack clean functionality:
TestTgStackClean: Verifies clean after generateTestTgStackCleanNonExistentStack: Verifies clean works when stack doesn't existTestTgStackCleanAfterRun: Verifies clean after running stack commandsBreaking Changes
None. All existing functionality preserved with backward compatibility.