Skip to content

Commit fed43af

Browse files
authored
fix: Fixing tofu/terraform binary selection for run --all usage (#6753)
1 parent 63a06cb commit fed43af

3 files changed

Lines changed: 718 additions & 2 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
version: "v1.1.4"
3+
category: "bug-fixes"
4+
---
5+
6+
#### `terraform_binary` respected when reading dependency outputs
7+
8+
Reading a [`dependency`](/reference/hcl/blocks#dependency) block's outputs ignored the [`terraform_binary`](/reference/hcl/attributes#terraform_binary) of the unit being read and fell back to the auto-detected binary, which is OpenTofu whenever `tofu` is on your `PATH`. With `terraform_binary = "terraform"`, a unit ran through Terraform while the dependency it consumed was read through OpenTofu. A `run --all` over units that each worked on their own then failed with a backend initialization error, followed by a misleading `There is no variable named "dependency"`.
9+
10+
Dependency outputs are now read through the binary the dependency itself configures, so a unit's `terraform_binary` applies wherever its state is read. [`--tf-path`](/reference/cli/commands/run#tf-path) and `TG_TF_PATH` still take precedence over the config value.

0 commit comments

Comments
 (0)