Skip to content

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

Description

@matthewgulliver

Describe the bug
Terratest fails when running tests with Terragrunt v0.85.0 or later due to the use of the deprecated --terragrunt-non-interactive flag, which was replaced with --non-interactive as part of Terragrunt's CLI redesign.

To Reproduce
Steps to reproduce the behavior:

  1. Install Terragrunt v0.85.0 or later
  2. Run any terratest test that uses terragrunt as the TerraformBinary
  3. Observe the failure
terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{
    TerraformDir:    "../examples/terragrunt-example",
    TerraformBinary: "terragrunt",
})

terraform.Apply(t, terraformOptions) // This will fail

Expected behavior
Tests should run successfully with modern Terragrunt versions.

Actual behavior
Tests fail with error:

Error: Failed to parse command-line flags
│ 
│ flag provided but not defined: -terragrunt-non-interactive

Terminal output

TestTerragruntExample 2025-09-09T17:07:03+10:00 logger.go:67: time=2025-09-09AEST17:07:03+10:00 level=stderr tf-path=terraform msg=│ Error: Failed to parse command-line flags
TestTerragruntExample 2025-09-09T17:07:03+10:00 logger.go:67: time=2025-09-09AEST17:07:03+10:00 level=stderr tf-path=terraform msg=│ 
TestTerragruntExample 2025-09-09T17:07:03+10:00 logger.go:67: time=2025-09-09AEST17:07:03+10:00 level=stderr tf-path=terraform msg=│ flag provided but not defined: -terragrunt-non-interactive

Versions

  • Terratest version: Latest (main branch - commit a4af63b)
  • Terragrunt version: v0.86.2
  • Terraform version: v1.13.1
  • Go version: v1.24.2
  • Environment details: Ubuntu 24.04.2 LTS

Additional context
This issue is caused by Terragrunt's CLI redesign that deprecated all --terragrunt-* prefixed flags in version 0.85.0 (released Aug 15, 2025). The --terragrunt-non-interactive flag was replaced with --non-interactive.

Also:

args = append(args, "--terragrunt-non-interactive")

That flag got deprecated removed in v0.85.

Originally posted by @tgeijg in #1586

  • No existing PRs address this issue in Terratest or Terragrunt repos

Related:

Root Cause
The issue is in /modules/terraform/cmd.go line 59:

args = append(args, "--terragrunt-non-interactive")  // This flag no longer exists

Proposed Solution
Update to use the new flag:

args = append(args, "--non-interactive")  // Modern Terragrunt flag

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions