Skip to content

Improve Terragrunt + Terratest documentation and deprecate Tg* functions#1638

Merged
james00012 merged 3 commits intomainfrom
improve-terragrunt-docs-and-deprecate-tg-functions
Dec 23, 2025
Merged

Improve Terragrunt + Terratest documentation and deprecate Tg* functions#1638
james00012 merged 3 commits intomainfrom
improve-terragrunt-docs-and-deprecate-tg-functions

Conversation

@james00012
Copy link
Copy Markdown
Contributor

@james00012 james00012 commented Dec 19, 2025

Summary

  • Address user feedback about difficulty discovering how to use Terratest with Terragrunt
  • Deprecate terragrunt-related functions in modules/terraform module (TgApplyAll, TgDestroyAll, TgPlanAllExitCode, ValidateInputs, etc.)
  • Add documentation for Terragrunt testing patterns
  • Add multi-module terragrunt example

Test plan

  • Verify existing tests still pass
  • Review documentation for accuracy

Closes #1636

@james00012 james00012 marked this pull request as ready for review December 19, 2025 01:43
Deprecate terragrunt-related functions in modules/terraform:
- TgApplyAll, TgApplyAllE -> terragrunt.ApplyAll
- TgDestroyAll, TgDestroyAllE -> terragrunt.DestroyAll
- TgPlanAllExitCode, TgPlanAllExitCodeE -> terragrunt.PlanAllExitCode
- ValidateInputs, InitAndValidateInputs -> terragrunt package
- TgInvalidBinary, AssertTgPlanAllExitCode -> terragrunt package

Add documentation:
- New testing-terragrunt.md page with single/multi-module patterns
- Add terragrunt to packages-overview.md
- Update examples.yml with single-module and multi-module entries

Add multi-module example:
- examples/terragrunt-multi-module-example with VPC -> Database -> App
- Update test/terragrunt_example_test.go with both testing patterns

Closes #1636
@james00012 james00012 force-pushed the improve-terragrunt-docs-and-deprecate-tg-functions branch from 7628e5c to fff5753 Compare December 19, 2025 01:54
denis256
denis256 previously approved these changes Dec 19, 2025
- TestTerragruntExample: Use OutputAll instead of Output because
  terragrunt returns all outputs in the full JSON format even when
  a specific key is requested
- TestTerragruntMultiModuleExample: Copy the parent folder including
  modules since terragrunt.hcl files reference ../modules
Move test/terragrunt_example_test.go to modules/terragrunt/ since it's
terragrunt-related. Also fix test isolation by copying examples to temp
folders to avoid state conflicts between parallel test runs.
@james00012 james00012 merged commit c4cb41a into main Dec 23, 2025
2 of 3 checks passed
@james00012 james00012 deleted the improve-terragrunt-docs-and-deprecate-tg-functions branch December 23, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Terragrunt + Terratest documentation and discoverability

2 participants