Skip to content

Commit

Permalink
fix: support both terragrunt < 0.67 and >= 0.67
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 committed Oct 7, 2024
1 parent 89a8d12 commit 16b0b05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ To use tofu, set `--program=tofu`. Ensure it is installed first.

To use terragrunt, set `--program=terragrunt`. Ensure it is installed first.

NOTE: only terragrunt versions v0.67 and later are supported.

When `terragrunt` is specified as the program executable, Pug enables "terragrunt mode":

* Modules are detected via the presence of a `terragrunt.hcl` file. (You may want to rename the top-level `terragrunt.hcl` file to something else otherwise it is mis-detected as a module).
Expand Down
2 changes: 1 addition & 1 deletion internal/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (f *factory) newTask(spec Spec) (*Task, error) {
// TODO: introduce a better way to determine whether terrarunt is in use.
// Perhaps use constants for terraform, tofu, and terragrunt.
if task.Program == "terragrunt" && f.terragrunt {
task.Args = append(task.Args, "--terragrunt-forward-tf-stdout")
task.AdditionalEnv = append(task.AdditionalEnv, "TERRAGRUNT_FORWARD_TF_STDOUT=1")
task.Args = append(task.Args, "--terragrunt-non-interactive")
}
return task, nil
Expand Down

0 comments on commit 16b0b05

Please sign in to comment.