Skip to content

Conversation

@matthewgulliver
Copy link

@matthewgulliver matthewgulliver commented Sep 9, 2025

Description

Updates Terratest to be compatible with Terragrunt v0.85.0+ by replacing the deprecated --terragrunt-non-interactive flag with the new --non-interactive flag.
This resolves test failures that occur when using modern Terragrunt versions due to Terragrunt's CLI redesign that removed all --terragrunt-* prefixed flags in favor of shorter alternatives.

Changes Made

  • File: modules/terraform/cmd.go
  • Change: Line 59 updated from --terragrunt-non-interactive to --non-interactive
  • Documentation: Added comment explaining the change with reference to Terragrunt CLI redesign docs

Testing

✅ Verified with Terragrunt v0.86.2, Go v1.24.2 on Ubuntu 24.04
✅ All terragrunt tests pass: TestTerragruntExample, TestTerragruntConsole

Backward Compatibility

This change maintains compatibility:

  • Terragrunt v0.85.0+: Uses new --non-interactive flag
  • Earlier versions: Also support --non-interactive (flag existed before deprecation)

TODOs

  • Update the code
  • Run the relevant tests successfully
  • Ensure no 3rd party code issues (N/A)
  • Include release notes
  • Verify fix works with multiple Terragrunt versions

Release Notes (draft)

Updated Terratest Terragrunt integration to use --non-interactive flag instead of deprecated --terragrunt-non-interactive flag for compatibility with Terragrunt v0.85.0+.

Migration Guide

No migration required for users. This is an internal change to maintain compatibility with modern Terragrunt versions. Users may need to update their Terragrunt installations if using very old versions, but this change is backward compatible with all supported Terragrunt releases.

References

@yhakbar
Copy link
Contributor

yhakbar commented Sep 9, 2025

This is a breaking change in that it raises the minimum required version of Terragrunt to v0.73.0. We'd want the docs updated accordingly.

@james00012
Copy link
Contributor

Hi @matthewgulliver friendly ping on the comment to address above. Are you still working on this PR?

@matthewgulliver
Copy link
Author

matthewgulliver commented Sep 30, 2025

Hey @james00012, thanks for the reminder. I've added Terragrunt v0.73.0+ requirement to the Requirements section in docs/_docs/01_getting-started/quick-start.md. Let me know if any further changes are needed.

@matthewgulliver matthewgulliver force-pushed the fix-terragrunt-non-interactive-flag branch from 31dced0 to b39739d Compare September 30, 2025 11:19
@steffsas
Copy link

When is this going to be merged? This is a blocker of using Terratest and Terragrunt with newer versions.

@fanovilla
Copy link

fanovilla commented Nov 11, 2025

hi team, yep keen to have this in a new release; @james00012

@matthewgulliver
Copy link
Author

Hey @james00012 @yhakbar,

Just checking in to see if there was anything I'd missed or whether you guys have any further requirements for the PR? If so, just let me know and I'll make the necessary changes.

Thanks,
Matt.

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.

Terratest fails with Terragrunt v0.85.0+ due to deprecated --terragrunt-non-interactive flag

5 participants