Skip to content

Add terragrunt v1.0 CLI forward compatibility #1677

@james00012

Description

@james00012

Summary

Terragrunt v1.0 (expected Q1 2026) introduces a CLI redesign that changes how terraform passthrough commands are invoked. The terratest terragrunt module currently uses the legacy CLI format which will be deprecated.

What changes

Legacy (current) v1.0
terragrunt plan ... terragrunt run plan ...
terragrunt plan --all ... terragrunt run --all plan ...
terragrunt hcl format terragrunt hcl fmt

Native terragrunt commands (hcl validate, render, dag graph, stack *) are unchanged.

Proposed implementation

  • Add UseLegacyCLI bool field to Options struct (default false = v1.0 format)
  • Centralize the command transformation in cmd.go: prepend run for terraform passthrough commands (init, plan, apply, destroy, validate, output), reposition --all flag
  • Update format.go: formatfmt in v1.0 mode
  • Update run_all.go: adjust arg ordering for run --all <cmd>
  • No changes to public API — all 58 functions keep their signatures

Files to modify

  • modules/terragrunt/options.go
  • modules/terragrunt/cmd.go
  • modules/terragrunt/format.go
  • modules/terragrunt/run_all.go
  • Corresponding test files

References

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