Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFENV_TERRAFORM_VERSION not working #344

Closed
chris-peterson opened this issue Feb 3, 2025 · 0 comments · Fixed by #347
Closed

TFENV_TERRAFORM_VERSION not working #344

chris-peterson opened this issue Feb 3, 2025 · 0 comments · Fixed by #347
Assignees
Labels
bug Something isn't working

Comments

@chris-peterson
Copy link

Describe the bug
Starting in 3.2.11, terraform environment variables (e.g. TFENV_TERRAFORM_VERSION) aren't working as expected.

To Reproduce

export TFENV_TERRAFORM_VERSION='1.7.5'
make build

With version 3.2.10 and earlier:

./build/tenv tf detect
Resolved version from TFENV_TERRAFORM_VERSION : 1.7.5
Auto-install is disabled. To install Terraform version 1.7.5, you can set environment variable TENV_AUTO_INSTALL=true, or install it via any of the following command: 'tenv terraform install', 'tenv terraform install 1.7.5'
no compatible version found locally
Terraform 1.7.5 will be run from this directory.

With 3.2.11 and later:

./build/tenv tf detect
No version files found for Terraform, fallback to latest-allowed strategy
Scan project to find IAC files
No Terraform version requirement found in project files, fallback to latest strategy
Found compatible version installed locally : 1.10.5
Terraform 1.10.5 will be run from this directory.

Expected behavior
Expected resolved version to be 1.7.5, not 1.10.5

Additional Details
This was introduced in 439b6d9. The prior sha (4fe5463) works as expected

@kvendingoldo kvendingoldo added the bug Something isn't working label Feb 3, 2025
@dvaumoron dvaumoron self-assigned this Feb 5, 2025
dvaumoron added a commit that referenced this issue Feb 9, 2025
Signed-off-by: Denis Vaumoron <dvaumoron@gmail.com>
dvaumoron added a commit that referenced this issue Feb 9, 2025
Signed-off-by: Denis Vaumoron <dvaumoron@gmail.com>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Feb 11, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [tofuutils/tenv](/~https://github.com/tofuutils/tenv) | minor | `v4.1.0` -> `v4.2.4` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>tofuutils/tenv (tofuutils/tenv)</summary>

### [`v4.2.4`](/~https://github.com/tofuutils/tenv/releases/tag/v4.2.4)

[Compare Source](tofuutils/tenv@v4.2.3...v4.2.4)

#### Changelog

-   [`8d9e739`](tofuutils/tenv@8d9e739) fix(ci): telegram release notifications; escape . symbol

### [`v4.2.3`](/~https://github.com/tofuutils/tenv/releases/tag/v4.2.3)

[Compare Source](tofuutils/tenv@v4.2.2...v4.2.3)

#### Changelog

-   [`8d9e739`](tofuutils/tenv@8d9e739) fix(ci): telegram release notifications; escape . symbol

### [`v4.2.2`](/~https://github.com/tofuutils/tenv/releases/tag/v4.2.2)

[Compare Source](tofuutils/tenv@v4.2.1...v4.2.2)

#### Changelog

-   [`8d20a5e`](tofuutils/tenv@8d20a5e) fix(ci): telegram release notifications; escape - symbol

### [`v4.2.1`](/~https://github.com/tofuutils/tenv/releases/tag/v4.2.1)

[Compare Source](tofuutils/tenv@v4.2.0...v4.2.1)

#### Changelog

-   [`1806ea0`](tofuutils/tenv@1806ea0) fix(ci): set parse_mode=MarkdownV2 for telegram notifications

### [`v4.2.0`](/~https://github.com/tofuutils/tenv/releases/tag/v4.2.0)

[Compare Source](tofuutils/tenv@v4.1.0...v4.2.0)

#### Changelog

-   [`9104c02`](tofuutils/tenv@9104c02) fix(ci): release step
-   [`c351f7a`](tofuutils/tenv@c351f7a) chore: add v2 to .goreleaser_release_only.yml
-   [`45af921`](tofuutils/tenv@45af921) update README
-   [`504e2e8`](tofuutils/tenv@504e2e8) Switch tofu and terraform proxies to agnostic proxies with env var ([#&#8203;348](tofuutils/tenv#348))
-   [`638f4ae`](tofuutils/tenv@638f4ae) wrong env var prefix [#&#8203;344](tofuutils/tenv#344) ([#&#8203;347](tofuutils/tenv#347))
-   [`10efae3`](tofuutils/tenv@10efae3) gh-actions: bump sigstore/cosign-installer from 3.7.0 to 3.8.0 ([#&#8203;346](tofuutils/tenv#346))
-   [`e414bf2`](tofuutils/tenv@e414bf2) go: bump github.com/charmbracelet/bubbletea from 1.2.4 to 1.3.0 ([#&#8203;345](tofuutils/tenv#345))
-   [`df3ae32`](tofuutils/tenv@df3ae32) Merge pull request [#&#8203;343](tofuutils/tenv#343) from tofuutils/dependabot/go_modules/github.com/spf13/pflag-1.0.6
-   [`d7016dd`](tofuutils/tenv@d7016dd) go: bump github.com/spf13/pflag from 1.0.5 to 1.0.6

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](/~https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants