gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8.09k stars 981 forks source link

Relative path handling #3523

Closed denis256 closed 2 weeks ago

denis256 commented 2 weeks ago

Description

Included changes:

Before this change:

* Failed to execute "tofu plan -input=false -out=test/modules/module2/tfplan.tfplan" in ./modules/module2
  ╷
  │ Error: Failed to write plan file
  │ 
  │ The plan file could not be written: open
  │ test/modules/module2/tfplan.tfplan: no such file or directory.
  ╵

  exit status 1

After this change:

20:55:54.279 STDOUT [modules/module2] tofu: local_file.module2: Refreshing state... [id=0cf7edc2ec41ede392583a0ef1377a17feab24ae]
20:55:54.297 STDOUT [modules/module1] tofu: local_file.module1: Refreshing state... [id=999b7ab94303be85f2531d4fba0859374c6ce16f]
20:55:54.308 STDOUT [modules/module2] tofu: No changes. Your infrastructure matches the configuration.
20:55:54.308 STDOUT [modules/module2] tofu: OpenTofu has compared your real infrastructure against your configuration and
20:55:54.308 STDOUT [modules/module2] tofu: found no differences, so no changes are needed.
20:55:54.317 STDOUT [modules/module1] tofu: No changes. Your infrastructure matches the configuration.
20:55:54.318 STDOUT [modules/module1] tofu: OpenTofu has compared your real infrastructure against your configuration and
20:55:54.318 STDOUT [modules/module1] tofu: found no differences, so no changes are needed.
20:55:54.890 STDOUT [app] tofu: local_file.app: Refreshing state... [id=7d1043473d55bfa90e8530d35801d4e381bc69f0]
20:55:54.919 STDOUT [app] tofu: No changes. Your infrastructure matches the configuration.
20:55:54.919 STDOUT [app] tofu: OpenTofu has compared your real infrastructure against your configuration and
20:55:54.919 STDOUT [app] tofu: found no differences, so no changes are needed.

Fixes #3253.

TODOs

Read the Gruntwork contribution guidelines.

Release Notes (draft)

Added / Removed / Updated [X].

Updated --terragrunt-out-dir / --terragrunt-json-out-dir to handle relative paths.

Migration Guide