tofuutils / tenv Goto Github PK
View Code? Open in Web Editor NEWOpenTofu / Terraform / Terragrunt and Atmos version manager
Home Page: https://tofuutils.github.io/tenv/
License: Apache License 2.0
OpenTofu / Terraform / Terragrunt and Atmos version manager
Home Page: https://tofuutils.github.io/tenv/
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
Reduce the project size in order to make it easier to clone.
Describe the solution you'd like
Can erase (not used anymore) :
Describe alternatives you've considered
None
Additional context
tools like git-filter-repo allow to do that easily
Unsure about the effect on existing tag
Describe the bug
When the terraform version is managed with tenv, it is adding a
Resolved version from ...` message at the beginning of the output. This causes JSON (or any structured terraform output) to have illegal characters in it.
To Reproduce
Steps to reproduce the behavior:
tenv tf install 1.5.0
(or any other version).terraform apply
terraform output -no-color -json
❯ terraform output -no-color -json
Resolved version from /Users/<user_name>/.tenv/Terraform/version : 1.5.0
{
"test_output": "Hello world!"
}
Expected behavior
tenv shouldn't be prefixing the terraform resolution message: Resolved version from /<user_home>/.tenv/Terraform/version : 1.5.0
or should at least have a documented way to suppress this warning.
Screenshots
Environment (please complete the following information):
Additional context
This error doesn't occur with tfenv
.
Is your feature request related to a problem? Please describe.
This issue separate an enhancement requested in #63
Describe the solution you'd like
When the needed version is already installed, the informative display will be switched to log (display should wait until the presence on local folder have been checked).
Describe alternatives you've considered
None
Additional context
None
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#use-terragrunthcl-file
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#33
cc @skyzyx
Describe the bug
tenv doesn't install terraform versions < 1.2.0
tried this on several version doesn't work on anything less than 1.2.0
To Reproduce
Steps to reproduce the behavior:
.terraform-version
to 0.15.0
terraform init
Expected behavior
downloads and uses terraform version 0.15.0
Screenshots
Resolved version from .terraform-version : 0.15.0
Installing Terraform 0.15.0
Fetching release information from https://releases.hashicorp.com/terraform/0.15.0/index.json
Failed to detect a version allowing to call terraform : searched asset not found
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
We need to add a support of installing tenv from MSI.
https://goreleaser.com/customization/msi/
Is your feature request related to a problem? Please describe.
I'm trying to use tenv
with TFENV_REMOTE=https://artifactory.example.com/artifactory/hashicorp
. This is my company internal Artifactory mirror of https://releases.hashicorp.com/.
Here's my error output:
❯ tenv tf list-remote -v
Error: unexpected value returned by API
Usage:
tenv tf list-remote [flags]
Flags:
-d, --descending display list in descending version order
-h, --help help for list-remote
-u, --remote-url string remote url to install from (default "https://artifactory.example.com/artifactory/hashicorp/")
-s, --stable display only stable version
Global Flags:
-r, --root-path string local path to install versions of OpenTofu and Terraform (default "/Users/me/.tenv")
-v, --verbose verbose output
unexpected value returned by API
Describe the solution you'd like
❯ tenv tf list-remote -v
1.7.1
1.7.0-rc2
1.7.0-rc1
1.7.0-beta2
1.7.0-beta1
1.7.0-alpha20231130
1.7.0-alpha20231108
1.7.0-alpha20231025
1.7.0
1.6.6
...
Describe alternatives you've considered
None.
Additional context
With Artifactory acting as a mirror of https://releases.hashicorp.com/, if you download the index.json
file, it will be cached in Artifactory forever, so you cannot count on it to know which TF releases are available on Artifactory. The only way is unfortunately to parse the HTML output from Artifactory.
For example:
<!DOCTYPE html>
<html>
<head><meta name="robots" content="noindex" />
<title>Index of hashicorp/terraform</title>
</head>
<body>
<h1>Index of hashicorp/terraform</h1>
<pre>Name Last modified Size</pre><hr/>
<pre><a href="../">../</a>
<a href="0.1.0/">0.1.0/</a> 15-Jun-2023 16:35 -
<a href="0.1.1/">0.1.1/</a> 15-Jun-2023 16:34 -
<a href="0.10.0/">0.10.0/</a> 15-Jun-2023 15:41 -
<a href="0.10.0-beta1/">0.10.0-beta1/</a> 22-Oct-2023 07:56 -
<a href="0.10.0-beta2/">0.10.0-beta2/</a> 23-Oct-2023 10:54 -
<a href="0.10.0-rc1/">0.10.0-rc1/</a> 22-Oct-2023 13:17 -
<a href="0.10.1/">0.10.1/</a> 15-Jun-2023 15:41 -
<a href="0.10.2/">0.10.2/</a> 15-Jun-2023 15:40 -
<a href="0.10.3/">0.10.3/</a> 15-Jun-2023 15:40 -
<a href="0.10.4/">0.10.4/</a> 15-Jun-2023 15:40 -
<a href="0.10.5/">0.10.5/</a> 15-Jun-2023 15:39 -
<a href="0.10.6/">0.10.6/</a> 15-Jun-2023 15:39 -
<a href="0.10.7/">0.10.7/</a> 15-Jun-2023 15:39 -
<a href="0.10.8/">0.10.8/</a> 15-Jun-2023 15:38 -
<a href="0.11.0/">0.11.0/</a> 15-Jun-2023 15:38 -
<a href="0.11.0-beta1/">0.11.0-beta1/</a> 23-Oct-2023 10:48 -
<a href="0.11.0-rc1/">0.11.0-rc1/</a> 22-Oct-2023 12:47 -
<a href="0.11.1/">0.11.1/</a> 15-Jun-2023 15:38 -
<a href="0.11.10/">0.11.10/</a> 15-Jun-2023 15:35 -
<a href="0.11.11/">0.11.11/</a> 15-Jun-2023 15:34 -
<a href="0.11.12/">0.11.12/</a> 15-Jun-2023 15:34 -
<a href="0.11.12-beta1/">0.11.12-beta1/</a> 22-Oct-2023 08:27 -
<a href="0.11.13/">0.11.13/</a> 15-Jun-2023 15:33 -
<a href="0.11.14/">0.11.14/</a> 15-Jun-2023 15:33 -
<a href="0.11.15/">0.11.15/</a> 15-Jun-2023 15:33 -
<a href="0.11.15-oci/">0.11.15-oci/</a> 22-Oct-2023 13:18 -
<a href="0.11.2/">0.11.2/</a> 15-Jun-2023 15:37 -
<a href="0.11.3/">0.11.3/</a> 15-Jun-2023 15:37 -
<a href="0.11.4/">0.11.4/</a> 15-Jun-2023 15:37 -
<a href="0.11.5/">0.11.5/</a> 15-Jun-2023 15:36 -
<a href="0.11.6/">0.11.6/</a> 15-Jun-2023 15:36 -
<a href="0.11.7/">0.11.7/</a> 15-Jun-2023 15:36 -
<a href="0.11.8/">0.11.8/</a> 15-Jun-2023 15:35 -
<a href="0.11.9/">0.11.9/</a> 15-Jun-2023 15:35 -
<a href="0.11.9-beta1/">0.11.9-beta1/</a> 22-Oct-2023 13:23 -
<a href="0.12.0/">0.12.0/</a> 15-Jun-2023 15:32 -
<a href="0.12.0-alpha1/">0.12.0-alpha1/</a> 22-Oct-2023 12:48 -
<a href="0.12.0-alpha2/">0.12.0-alpha2/</a> 22-Oct-2023 13:28 -
<a href="0.12.0-alpha3/">0.12.0-alpha3/</a> 22-Oct-2023 13:04 -
<a href="0.12.0-alpha4/">0.12.0-alpha4/</a> 22-Oct-2023 12:53 -
<a href="0.12.0-beta1/">0.12.0-beta1/</a> 22-Oct-2023 13:26 -
<a href="0.12.0-beta2/">0.12.0-beta2/</a> 22-Oct-2023 13:15 -
<a href="0.12.0-rc1/">0.12.0-rc1/</a> 22-Oct-2023 12:57 -
<a href="0.12.1/">0.12.1/</a> 15-Jun-2023 15:32 -
<a href="0.12.10/">0.12.10/</a> 15-Jun-2023 15:29 -
<a href="0.12.11/">0.12.11/</a> 15-Jun-2023 15:29 -
<a href="0.12.12/">0.12.12/</a> 15-Jun-2023 15:28 -
<a href="0.12.13/">0.12.13/</a> 15-Jun-2023 15:28 -
<a href="0.12.14/">0.12.14/</a> 15-Jun-2023 15:28 -
<a href="0.12.15/">0.12.15/</a> 15-Jun-2023 15:27 -
<a href="0.12.16/">0.12.16/</a> 15-Jun-2023 15:27 -
<a href="0.12.17/">0.12.17/</a> 15-Jun-2023 15:27 -
<a href="0.12.18/">0.12.18/</a> 15-Jun-2023 15:26 -
<a href="0.12.19/">0.12.19/</a> 15-Jun-2023 15:26 -
<a href="0.12.2/">0.12.2/</a> 15-Jun-2023 15:32 -
<a href="0.12.20/">0.12.20/</a> 15-Jun-2023 15:25 -
<a href="0.12.21/">0.12.21/</a> 15-Jun-2023 15:25 -
<a href="0.12.22/">0.12.22/</a> 15-Jun-2023 15:25 -
<a href="0.12.23/">0.12.23/</a> 15-Jun-2023 15:24 -
<a href="0.12.24/">0.12.24/</a> 15-Jun-2023 15:24 -
<a href="0.12.25/">0.12.25/</a> 15-Jun-2023 15:24 -
<a href="0.12.26/">0.12.26/</a> 15-Jun-2023 15:23 -
<a href="0.12.27/">0.12.27/</a> 15-Jun-2023 15:23 -
<a href="0.12.28/">0.12.28/</a> 15-Jun-2023 15:22 -
<a href="0.12.29/">0.12.29/</a> 15-Jun-2023 15:22 -
<a href="0.12.3/">0.12.3/</a> 15-Jun-2023 15:31 -
<a href="0.12.30/">0.12.30/</a> 15-Jun-2023 15:21 -
<a href="0.12.31/">0.12.31/</a> 15-Jun-2023 15:20 -
<a href="0.12.4/">0.12.4/</a> 15-Jun-2023 15:31 -
<a href="0.12.5/">0.12.5/</a> 15-Jun-2023 15:31 -
<a href="0.12.6/">0.12.6/</a> 15-Jun-2023 15:30 -
<a href="0.12.7/">0.12.7/</a> 15-Jun-2023 15:30 -
<a href="0.12.8/">0.12.8/</a> 15-Jun-2023 15:30 -
<a href="0.12.9/">0.12.9/</a> 15-Jun-2023 15:29 -
<a href="0.13.0/">0.13.0/</a> 15-Jun-2023 15:19 -
<a href="0.13.0-beta1/">0.13.0-beta1/</a> 23-Oct-2023 10:11 -
<a href="0.13.0-beta2/">0.13.0-beta2/</a> 22-Oct-2023 12:38 -
<a href="0.13.0-beta3/">0.13.0-beta3/</a> 23-Oct-2023 10:47 -
<a href="0.13.0-rc1/">0.13.0-rc1/</a> 23-Oct-2023 10:54 -
<a href="0.13.1/">0.13.1/</a> 15-Jun-2023 15:18 -
<a href="0.13.2/">0.13.2/</a> 15-Jun-2023 15:17 -
<a href="0.13.3/">0.13.3/</a> 15-Jun-2023 15:16 -
<a href="0.13.4/">0.13.4/</a> 15-Jun-2023 15:15 -
<a href="0.13.5/">0.13.5/</a> 15-Jun-2023 15:14 -
<a href="0.13.6/">0.13.6/</a> 15-Jun-2023 15:12 -
<a href="0.13.7/">0.13.7/</a> 15-Jun-2023 15:11 -
<a href="0.14.0/">0.14.0/</a> 15-Jun-2023 15:10 -
<a href="0.14.0-alpha20200910/">0.14.0-alpha20200910/</a> 22-Oct-2023 12:47 -
<a href="0.14.0-alpha20200923/">0.14.0-alpha20200923/</a> 22-Oct-2023 13:20 -
<a href="0.14.0-alpha20201007/">0.14.0-alpha20201007/</a> 23-Oct-2023 10:37 -
<a href="0.14.0-beta1/">0.14.0-beta1/</a> 22-Oct-2023 12:39 -
<a href="0.14.0-beta2/">0.14.0-beta2/</a> 23-Oct-2023 10:33 -
<a href="0.14.0-rc1/">0.14.0-rc1/</a> 22-Oct-2023 12:44 -
<a href="0.14.1/">0.14.1/</a> 15-Jun-2023 15:08 -
<a href="0.14.10/">0.14.10/</a> 15-Jun-2023 14:57 -
<a href="0.14.11/">0.14.11/</a> 15-Jun-2023 14:56 -
<a href="0.14.2/">0.14.2/</a> 15-Jun-2023 15:07 -
<a href="0.14.3/">0.14.3/</a> 15-Jun-2023 15:06 -
<a href="0.14.4/">0.14.4/</a> 15-Jun-2023 15:05 -
<a href="0.14.5/">0.14.5/</a> 15-Jun-2023 15:04 -
<a href="0.14.6/">0.14.6/</a> 15-Jun-2023 15:03 -
<a href="0.14.7/">0.14.7/</a> 15-Jun-2023 15:01 -
<a href="0.14.8/">0.14.8/</a> 15-Jun-2023 15:00 -
<a href="0.14.9/">0.14.9/</a> 15-Jun-2023 14:59 -
<a href="0.15.0/">0.15.0/</a> 15-Jun-2023 14:55 -
<a href="0.15.0-alpha20210107/">0.15.0-alpha20210107/</a> 23-Oct-2023 10:52 -
<a href="0.15.0-alpha20210127/">0.15.0-alpha20210127/</a> 23-Oct-2023 09:54 -
<a href="0.15.0-alpha20210210/">0.15.0-alpha20210210/</a> 22-Oct-2023 13:18 -
<a href="0.15.0-beta1/">0.15.0-beta1/</a> 22-Oct-2023 13:19 -
<a href="0.15.0-beta2/">0.15.0-beta2/</a> 22-Oct-2023 12:45 -
<a href="0.15.0-rc1/">0.15.0-rc1/</a> 23-Oct-2023 10:47 -
<a href="0.15.0-rc2/">0.15.0-rc2/</a> 22-Oct-2023 13:12 -
<a href="0.15.1/">0.15.1/</a> 15-Jun-2023 14:54 -
<a href="0.15.2/">0.15.2/</a> 15-Jun-2023 14:53 -
<a href="0.15.3/">0.15.3/</a> 15-Jun-2023 14:52 -
<a href="0.15.4/">0.15.4/</a> 15-Jun-2023 14:50 -
<a href="0.15.5/">0.15.5/</a> 15-Jun-2023 14:49 -
<a href="0.2.0/">0.2.0/</a> 15-Jun-2023 16:34 -
<a href="0.2.1/">0.2.1/</a> 15-Jun-2023 16:34 -
<a href="0.2.2/">0.2.2/</a> 15-Jun-2023 16:33 -
<a href="0.3.0/">0.3.0/</a> 15-Jun-2023 16:33 -
<a href="0.3.1/">0.3.1/</a> 15-Jun-2023 16:32 -
<a href="0.3.5/">0.3.5/</a> 15-Jun-2023 16:32 -
<a href="0.3.6/">0.3.6/</a> 15-Jun-2023 16:31 -
<a href="0.3.7/">0.3.7/</a> 15-Jun-2023 16:30 -
<a href="0.4.0/">0.4.0/</a> 15-Jun-2023 16:30 -
<a href="0.4.1/">0.4.1/</a> 15-Jun-2023 16:29 -
<a href="0.4.2/">0.4.2/</a> 15-Jun-2023 16:28 -
<a href="0.5.0/">0.5.0/</a> 15-Jun-2023 16:28 -
<a href="0.5.1/">0.5.1/</a> 15-Jun-2023 16:27 -
<a href="0.5.3/">0.5.3/</a> 07-Jun-2023 16:34 -
<a href="0.6.0/">0.6.0/</a> 15-Jun-2023 16:25 -
<a href="0.6.1/">0.6.1/</a> 15-Jun-2023 16:24 -
<a href="0.6.10/">0.6.10/</a> 15-Jun-2023 16:14 -
<a href="0.6.11/">0.6.11/</a> 15-Jun-2023 16:12 -
<a href="0.6.12/">0.6.12/</a> 15-Jun-2023 16:11 -
<a href="0.6.13/">0.6.13/</a> 15-Jun-2023 16:09 -
<a href="0.6.14/">0.6.14/</a> 15-Jun-2023 16:07 -
<a href="0.6.15/">0.6.15/</a> 15-Jun-2023 16:05 -
<a href="0.6.16/">0.6.16/</a> 15-Jun-2023 16:03 -
<a href="0.6.2/">0.6.2/</a> 15-Jun-2023 16:24 -
<a href="0.6.3/">0.6.3/</a> 15-Jun-2023 16:23 -
<a href="0.6.4/">0.6.4/</a> 15-Jun-2023 16:22 -
<a href="0.6.5/">0.6.5/</a> 15-Jun-2023 16:21 -
<a href="0.6.6/">0.6.6/</a> 15-Jun-2023 16:20 -
<a href="0.6.7/">0.6.7/</a> 15-Jun-2023 16:18 -
<a href="0.6.8/">0.6.8/</a> 15-Jun-2023 16:17 -
<a href="0.6.9/">0.6.9/</a> 15-Jun-2023 16:15 -
<a href="0.7.0/">0.7.0/</a> 15-Jun-2023 16:03 -
<a href="0.7.1/">0.7.1/</a> 15-Jun-2023 16:03 -
<a href="0.7.10/">0.7.10/</a> 15-Jun-2023 15:58 -
<a href="0.7.11/">0.7.11/</a> 15-Jun-2023 15:57 -
<a href="0.7.12/">0.7.12/</a> 15-Jun-2023 15:57 -
<a href="0.7.13/">0.7.13/</a> 15-Jun-2023 15:56 -
<a href="0.7.2/">0.7.2/</a> 15-Jun-2023 16:02 -
<a href="0.7.3/">0.7.3/</a> 15-Jun-2023 16:02 -
<a href="0.7.4/">0.7.4/</a> 15-Jun-2023 16:01 -
<a href="0.7.5/">0.7.5/</a> 15-Jun-2023 16:01 -
<a href="0.7.6/">0.7.6/</a> 15-Jun-2023 16:00 -
<a href="0.7.7/">0.7.7/</a> 15-Jun-2023 16:00 -
<a href="0.7.8/">0.7.8/</a> 15-Jun-2023 15:59 -
<a href="0.7.9/">0.7.9/</a> 15-Jun-2023 15:59 -
<a href="0.8.0/">0.8.0/</a> 15-Jun-2023 15:55 -
<a href="0.8.1/">0.8.1/</a> 15-Jun-2023 15:55 -
<a href="0.8.2/">0.8.2/</a> 15-Jun-2023 15:54 -
<a href="0.8.3/">0.8.3/</a> 15-Jun-2023 15:54 -
<a href="0.8.4/">0.8.4/</a> 15-Jun-2023 15:53 -
<a href="0.8.5/">0.8.5/</a> 15-Jun-2023 15:52 -
<a href="0.8.6/">0.8.6/</a> 15-Jun-2023 15:52 -
<a href="0.8.7/">0.8.7/</a> 15-Jun-2023 15:51 -
<a href="0.8.8/">0.8.8/</a> 15-Jun-2023 15:50 -
<a href="0.9.0/">0.9.0/</a> 15-Jun-2023 15:49 -
<a href="0.9.1/">0.9.1/</a> 15-Jun-2023 15:48 -
<a href="0.9.10/">0.9.10/</a> 15-Jun-2023 15:42 -
<a href="0.9.11/">0.9.11/</a> 15-Jun-2023 15:41 -
<a href="0.9.2/">0.9.2/</a> 15-Jun-2023 15:48 -
<a href="0.9.3/">0.9.3/</a> 15-Jun-2023 15:47 -
<a href="0.9.4/">0.9.4/</a> 15-Jun-2023 15:46 -
<a href="0.9.5/">0.9.5/</a> 15-Jun-2023 15:45 -
<a href="0.9.6/">0.9.6/</a> 15-Jun-2023 15:44 -
<a href="0.9.7/">0.9.7/</a> 15-Jun-2023 15:43 -
<a href="0.9.8/">0.9.8/</a> 15-Jun-2023 15:43 -
<a href="0.9.9/">0.9.9/</a> 15-Jun-2023 15:42 -
<a href="1.0.0/">1.0.0/</a> 15-Jun-2023 14:48 -
<a href="1.0.1/">1.0.1/</a> 15-Jun-2023 14:47 -
<a href="1.0.10/">1.0.10/</a> 15-Jun-2023 14:40 -
<a href="1.0.11/">1.0.11/</a> 15-Jun-2023 13:49 -
<a href="1.0.2/">1.0.2/</a> 15-Jun-2023 13:50 -
<a href="1.0.3/">1.0.3/</a> 15-Jun-2023 14:46 -
<a href="1.0.4/">1.0.4/</a> 15-Jun-2023 14:45 -
<a href="1.0.5/">1.0.5/</a> 15-Jun-2023 14:44 -
<a href="1.0.6/">1.0.6/</a> 15-Jun-2023 14:43 -
<a href="1.0.7/">1.0.7/</a> 15-Jun-2023 14:42 -
<a href="1.0.8/">1.0.8/</a> 15-Jun-2023 14:41 -
<a href="1.0.9/">1.0.9/</a> 15-Jun-2023 14:40 -
<a href="1.1.0/">1.1.0/</a> 15-Jun-2023 14:38 -
<a href="1.1.0-alpha20210616/">1.1.0-alpha20210616/</a> 22-Oct-2023 13:13 -
<a href="1.1.0-alpha20210630/">1.1.0-alpha20210630/</a> 22-Oct-2023 12:52 -
<a href="1.1.0-alpha20210714/">1.1.0-alpha20210714/</a> 22-Oct-2023 12:46 -
<a href="1.1.0-alpha20210728/">1.1.0-alpha20210728/</a> 22-Oct-2023 12:43 -
<a href="1.1.0-alpha20210811/">1.1.0-alpha20210811/</a> 23-Oct-2023 09:49 -
<a href="1.1.0-alpha20210908/">1.1.0-alpha20210908/</a> 22-Oct-2023 12:38 -
<a href="1.1.0-alpha20210922/">1.1.0-alpha20210922/</a> 22-Oct-2023 13:11 -
<a href="1.1.0-alpha20211006/">1.1.0-alpha20211006/</a> 23-Oct-2023 09:46 -
<a href="1.1.0-alpha20211020/">1.1.0-alpha20211020/</a> 22-Oct-2023 07:57 -
<a href="1.1.0-alpha20211029/">1.1.0-alpha20211029/</a> 22-Oct-2023 13:01 -
<a href="1.1.0-beta1/">1.1.0-beta1/</a> 23-Oct-2023 09:24 -
<a href="1.1.0-beta2/">1.1.0-beta2/</a> 22-Oct-2023 13:21 -
<a href="1.1.0-rc1/">1.1.0-rc1/</a> 23-Oct-2023 10:51 -
<a href="1.1.1/">1.1.1/</a> 15-Jun-2023 14:37 -
<a href="1.1.2/">1.1.2/</a> 15-Jun-2023 14:37 -
<a href="1.1.3/">1.1.3/</a> 15-Jun-2023 14:36 -
<a href="1.1.4/">1.1.4/</a> 15-Jun-2023 14:35 -
<a href="1.1.5/">1.1.5/</a> 15-Jun-2023 14:35 -
<a href="1.1.6/">1.1.6/</a> 15-Jun-2023 14:34 -
<a href="1.1.7/">1.1.7/</a> 24-Mar-2022 17:02 -
<a href="1.1.8/">1.1.8/</a> 22-Apr-2022 15:25 -
<a href="1.1.9/">1.1.9/</a> 22-Apr-2022 15:26 -
<a href="1.2.0/">1.2.0/</a> 19-May-2022 11:20 -
<a href="1.2.0-alpha-20220328/">1.2.0-alpha-20220328/</a> 22-Oct-2023 13:08 -
<a href="1.2.0-alpha20220413/">1.2.0-alpha20220413/</a> 22-Oct-2023 13:14 -
<a href="1.2.0-beta1/">1.2.0-beta1/</a> 22-Oct-2023 13:27 -
<a href="1.2.0-rc1/">1.2.0-rc1/</a> 22-Oct-2023 08:22 -
<a href="1.2.0-rc2/">1.2.0-rc2/</a> 22-Oct-2023 13:13 -
<a href="1.2.1/">1.2.1/</a> 24-May-2022 13:36 -
<a href="1.2.2/">1.2.2/</a> 13-Jun-2022 08:19 -
<a href="1.2.3/">1.2.3/</a> 17-Jun-2022 15:57 -
<a href="1.2.4/">1.2.4/</a> 29-Jun-2022 23:00 -
<a href="1.2.5/">1.2.5/</a> 13-Jul-2022 23:58 -
<a href="1.2.6/">1.2.6/</a> 28-Jul-2022 18:30 -
<a href="1.2.7/">1.2.7/</a> 17-Aug-2022 10:24 -
<a href="1.2.8/">1.2.8/</a> 24-Aug-2022 15:37 -
<a href="1.2.9/">1.2.9/</a> 10-Sep-2022 01:24 -
<a href="1.3.0/">1.3.0/</a> 21-Sep-2022 16:21 -
<a href="1.3.0-alpha20220608/">1.3.0-alpha20220608/</a> 23-Oct-2023 10:45 -
<a href="1.3.0-alpha20220622/">1.3.0-alpha20220622/</a> 22-Oct-2023 13:23 -
<a href="1.3.0-alpha20220706/">1.3.0-alpha20220706/</a> 22-Oct-2023 13:25 -
<a href="1.3.0-alpha20220803/">1.3.0-alpha20220803/</a> 22-Oct-2023 13:28 -
<a href="1.3.0-alpha20220817/">1.3.0-alpha20220817/</a> 23-Oct-2023 10:50 -
<a href="1.3.0-beta1/">1.3.0-beta1/</a> 23-Oct-2023 10:49 -
<a href="1.3.0-rc1/">1.3.0-rc1/</a> 23-Oct-2023 10:53 -
<a href="1.3.1/">1.3.1/</a> 28-Sep-2022 23:35 -
<a href="1.3.10/">1.3.10/</a> 22-Oct-2023 12:58 -
<a href="1.3.2/">1.3.2/</a> 07-Oct-2022 00:17 -
<a href="1.3.3/">1.3.3/</a> 19-Oct-2022 20:27 -
<a href="1.3.4/">1.3.4/</a> 02-Nov-2022 18:35 -
<a href="1.3.5/">1.3.5/</a> 19-Nov-2022 00:55 -
<a href="1.3.6/">1.3.6/</a> 30-Nov-2022 22:16 -
<a href="1.3.7/">1.3.7/</a> 04-Jan-2023 16:27 -
<a href="1.3.8/">1.3.8/</a> 10-Feb-2023 01:21 -
<a href="1.3.9/">1.3.9/</a> 16-Feb-2023 14:44 -
<a href="1.4.0/">1.4.0/</a> 08-Mar-2023 21:36 -
<a href="1.4.0-alpha20221109/">1.4.0-alpha20221109/</a> 22-Oct-2023 12:41 -
<a href="1.4.0-alpha20221207/">1.4.0-alpha20221207/</a> 22-Oct-2023 13:22 -
<a href="1.4.0-beta1/">1.4.0-beta1/</a> 22-Oct-2023 13:09 -
<a href="1.4.0-beta2/">1.4.0-beta2/</a> 23-Oct-2023 09:57 -
<a href="1.4.0-rc1/">1.4.0-rc1/</a> 22-Oct-2023 12:56 -
<a href="1.4.1/">1.4.1/</a> 15-Mar-2023 15:43 -
<a href="1.4.2/">1.4.2/</a> 16-Mar-2023 14:31 -
<a href="1.4.3/">1.4.3/</a> 30-Mar-2023 17:40 -
<a href="1.4.4/">1.4.4/</a> 30-Mar-2023 22:02 -
<a href="1.4.5/">1.4.5/</a> 14-Apr-2023 17:40 -
<a href="1.4.6/">1.4.6/</a> 27-Apr-2023 11:24 -
<a href="1.4.7/">1.4.7/</a> 23-Oct-2023 09:55 -
<a href="1.5.0/">1.5.0/</a> 12-Jun-2023 11:38 -
<a href="1.5.0-alpha20230405/">1.5.0-alpha20230405/</a> 22-Oct-2023 13:16 -
<a href="1.5.0-alpha20230504/">1.5.0-alpha20230504/</a> 23-Oct-2023 10:51 -
<a href="1.5.0-beta1/">1.5.0-beta1/</a> 22-Oct-2023 13:00 -
<a href="1.5.0-beta2/">1.5.0-beta2/</a> 23-Oct-2023 10:46 -
<a href="1.5.0-rc1/">1.5.0-rc1/</a> 22-Oct-2023 13:10 -
<a href="1.5.0-rc2/">1.5.0-rc2/</a> 22-Oct-2023 13:03 -
<a href="1.5.1/">1.5.1/</a> 27-Jun-2023 10:15 -
<a href="1.5.2/">1.5.2/</a> 10-Jul-2023 12:15 -
<a href="1.5.3/">1.5.3/</a> 21-Jul-2023 05:22 -
<a href="1.5.4/">1.5.4/</a> 31-Jul-2023 06:13 -
<a href="1.5.5/">1.5.5/</a> 14-Aug-2023 17:14 -
<a href="1.5.6/">1.5.6/</a> 22-Oct-2023 13:02 -
<a href="1.5.7/">1.5.7/</a> 23-Oct-2023 10:44 -
<a href="1.6.0/">1.6.0/</a> 22-Oct-2023 12:40 -
<a href="1.6.0-alpha20230719/">1.6.0-alpha20230719/</a> 22-Oct-2023 13:02 -
<a href="1.6.0-alpha20230802/">1.6.0-alpha20230802/</a> 22-Oct-2023 12:42 -
<a href="1.6.0-alpha20230816/">1.6.0-alpha20230816/</a> 22-Oct-2023 13:24 -
<a href="1.6.0-beta1/">1.6.0-beta1/</a> 23-Oct-2023 10:24 -
<a href="1.6.0-beta2/">1.6.0-beta2/</a> 23-Oct-2023 09:19 -
<a href="1.6.0-beta3/">1.6.0-beta3/</a> 22-Oct-2023 12:57 -
<a href="1.6.0-rc1/">1.6.0-rc1/</a> 22-Oct-2023 12:59 -
<a href="1.6.1/">1.6.1/</a> 23-Oct-2023 09:50 -
<a href="1.6.2/">1.6.2/</a> 22-Oct-2023 08:12 -
<a href="1.6.3/">1.6.3/</a> 02-Nov-2023 12:37 -
<a href="1.6.4/">1.6.4/</a> 16-Nov-2023 12:37 -
<a href="1.6.5/">1.6.5/</a> 29-Nov-2023 12:36 -
<a href="1.6.6/">1.6.6/</a> 14-Dec-2023 12:39 -
<a href="1.7.0/">1.7.0/</a> 18-Jan-2024 12:37 -
<a href="1.7.0-alpha20231025/">1.7.0-alpha20231025/</a> 25-Oct-2023 12:37 -
<a href="1.7.0-alpha20231108/">1.7.0-alpha20231108/</a> 09-Nov-2023 12:37 -
<a href="1.7.0-alpha20231130/">1.7.0-alpha20231130/</a> 01-Dec-2023 12:36 -
<a href="1.7.0-beta1/">1.7.0-beta1/</a> 07-Dec-2023 12:37 -
<a href="1.7.0-beta2/">1.7.0-beta2/</a> 14-Dec-2023 12:38 -
<a href="1.7.0-rc1/">1.7.0-rc1/</a> 21-Dec-2023 12:37 -
<a href="1.7.0-rc2/">1.7.0-rc2/</a> 12-Jan-2024 12:37 -
<a href="1.7.1/">1.7.1/</a> 24-Jan-2024 15:45 -
<a href="index.json">index.json</a> 17-Oct-2023 00:44 845.54 KB
</pre>
<hr/><address style="font-size:small;">Artifactory/7.68.20 Server</address></body></html>
Please note that the order is a lexical order, not version-aware order, so typically:
1.0.10 <-- before
1.0.2
1.0.3
...
1.0.9 <-- after
So you need to parse & extract the versions from the HTML page and reorder them to know which version is the latest
.
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#use-tfswitchrc-file
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#35
cc @skyzyx
Is your feature request related to a problem? Please describe.
Not a problem as much as just a wee bit of ambiguity.
As I'm moving between Tofu and Terraform frequently (for testing compatibility, migrations paths, and the likes), I've come to appreciate explicit distinction when referencing both tools in various workflows, often simultaneously.
Describe the solution you'd like
As a result, it'd be splendid if tenv
would support aliases for the tool names.
While this request is specifically to allow terraform
as an alias for tf
, I'm equally fond of adding human-friendly aliases for the others as well. For example:
tool | env vars | description |
---|---|---|
tofu (or opentofu ) |
TOFUENV_ | OpenTofu |
tf (or terraform ) |
TFENV_ | Terraform |
tg (or terragrunt ) |
TG_ | Terragrunt |
Describe alternatives you've considered
The simple workaround is to just use the specified tool name, adapting it as and when required. That being said, I believe this would be a nice-to-have feature that would make the tool more user-friendly.
Additional context
Big thanks to @kvendingoldo for identifying tenv
as a good fit for DevSecTop/TF-via-PR-Comments GH Action workflow!
These packages were very useful for Debian-based and other linux distros. Pls, return them back.
Describe the bug
When I try to generate terraform plugin documentation via tfplugindocs, like:
tfplugindocs generate -rendered-provider-name "Dodo"
I have a strange error:
rendering website for provider "terraform-provider-dodo" (as "Dodo")
exporting schema from Terraform
compiling provider "dodo"
using Terraform CLI binary from PATH if available, otherwise downloading latest Terraform CLI binary
running terraform init
getting provider schema
Error executing command: unable to generate website: invalid character 'R' looking for beginning of value
Looks like this is the same issue as described here:
hashicorp/terraform-plugin-docs#127
After reinstall terraform via tfenv wrapper - all works as expected:
make docs
==> Installing development tooling...
go generate -tags tools tools/tools.go
rendering website for provider "terraform-provider-dodo" (as "Dodo")
exporting schema from Terraform
compiling provider "dodo"
using Terraform CLI binary from PATH if available, otherwise downloading latest Terraform CLI binary
running terraform init
getting provider schema
rendering missing docs
generating missing resource content
generating missing data source content
generating template for "dodo_brand"
generating missing provider content
generating template for "terraform-provider-dodo"
rendering static website
cleaning rendered website dir
rendering templated website to static markdown
rendering "data-sources/brand.md.tmpl"
rendering "index.md.tmpl"
We need to add a support of installing tenv from snap
https://goreleaser.com/customization/snapcraft/
Is your feature request related to a problem? Please describe.
No direct problem.
Describe the solution you'd like
It would be cool if we could use this for managing the terragrunt version as well. We're now using tfenv and tgswitch respectively, both behaving in a slightly different way. Harmonizing this would be great.
Is your feature request related to a problem? Please describe.
We're transitioning from using terraform to using tofu. Now some directories are managed by terraform, and will be for the foreseeable future, while others are already managed by tofu. This produces 2 problems for me:
tofu
when I should type terraform
and vice versa.terraform
as per the default. There's a config option to change this, called g:terraform_binary_path
. I guess other editors work similarly.Describe the solution you'd like
I would like to see a command, installed by tenv, which I can use in either of these directories, which will automatically either run tofu or terraform for me, based on what tenv detect
detects to be needed locally.
Describe alternatives you've considered
For my brain I don't see much hope. For vim, I guess I could learn lua and botch something together that essentially repeats what tenv detect
does, based on the files it finds, and then configures vim-terraform dynamically. But that would be very hacky. Plus I guess other editors might benefit from such a proposed binary as well, so seems to me the better place to fix this within tenv
.
Additional context
Just as a suggestion for a name for this binary: tf
which seems to be the common denominator out of TerraForm and ToFu. But I don't mind, any name will do for me.
We need to add a support of installing tenv from choco.
https://goreleaser.com/customization/chocolatey/
For the last few weeks we implemented some new features inside of tofuenv and it will be good idea to move them to tenv too
Is your feature request related to a problem? Please describe.
When I want to have DEBUG logs, it's not convenient on a user perspective to have to set either TOFUENV_VERBOSE
or TFENV_VERBOSE
.
Moreover, there's no granularity in the log level.
Describe the solution you'd like
Let's not fall into the NIH (Not Invented Here) syndrome, and do just the same as Terraform / Tofu, i.e.:
TENV_LOG=DEBUG
Possible values:
TRACE
DEBUG
WARN
INFO
ERROR
Doc:
This way, using different tools around the TF/Tofu ecosystem will be smoother without unecessary frictions.
Golang lib that can help:
Describe alternatives you've considered
N/A.
Additional context
N/A.
Is your feature request related to a problem? Please describe.
Improve default on top of #38, tenv should be able to work with less input. The main usage of <TOOL>_REMOTE
is to indicate an artifactory proxy, so <TOOL>_LIST_MODE
and <TOOL>_LIST_URL
could be guessed.
Describe the solution you'd like
<TOOL>_LIST_URL
must default to the tool API URL unless <TOOL>_LIST_MODE
is set to html
For OpenTofu and Terragrunt which retrieving rely on GitHub API, <TOOL>_INSTALL_MODE
must be set to direct
when <TOOL>_REMOTE
is different from the tool API URL
Describe alternatives you've considered
None.
Additional context
None.
Pls, fix cosign test.
URL: https://github.com/tofuutils/tenv/actions/runs/7875659983/job/21488010720
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
cat << EOF > versions.tf
/*
Description: Required Terraform Versions
*/
terraform {
required_version = "1.5.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.36.0"
}
}
}
EOF
cat versions.tf | terraform fmt -
Outputs:
No version files found for Terraform , fallback to latest-allowed strategy
Scan project to find .tf files
Found compatible version installed locally : 1.5.7
/*
Description: Required Terraform Versions
*/
terraform {
required_version = "1.5.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.36.0"
}
}
}
Expected behavior
tenv
output is either suppressed or send to stderr instead.
This is an issue when the terraform command is used as a filter, for example when using it to format files in Neovim or other editors or scripts where there may not be a valid file on disk or the formatter is run on a buffer instead.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
We need to add a support of installing tenv from DMG.
https://goreleaser.com/customization/dmg/
Describe the bug
The latest
version is currently selecting even alpha, beta, rc.
The https://github.com/tfutils/tfenv behavior is to never use alpha, beta, rc versions, which is what most of users would like. Only devs / beta testers would consider using alpha, beta, rc versions.
To Reproduce
Steps to reproduce the behavior:
Create a .terraform-version
with latest
as the content.
Run:
TOFUENV_VERBOSE=true terraform fmt
It will download the latest version 1.8.0-alpha20240131
Expected behavior
I would expect to the latest stable version 1.7.2
to be used.
Screenshots
N/A.
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
At this moment we have Dockerfile, but we didn't tested it after the merge. Please, make sure that after a new release we'll get the right docker image at DockerHub
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#set-a-default-tf-version-for-cicd-pipeline
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#34
cc @skyzyx
Describe the bug
.opentofu-version and .terraform-version from parent directories are not considered
To Reproduce
mkdir -p /tmp/tfdir/subdir
echo '1.6.0' > /tmp/tfdir/.opentofu-version
cd /tmp/tfdir/subdir
tofu version
Expected behavior
OpenTofu v1.6.0
on linux_amd64
Actual behavior
OpenTofu v1.6.1
on linux_amd64
Environment (please complete the following information):
https://github.com/tofuutils/tenv/releases/tag/v1.0.6
tenv_.v1.0.6_Darwin_arm64.tar.gz
tenv_.v1.0.6_Darwin_x86_64.tar.gz
tenv_.v1.0.6_Freebsd_arm64.tar.gz
tenv_.v1.0.6_Freebsd_armv6.tar.gz
tenv_.v1.0.6_Freebsd_i386.tar.gz
tenv_.v1.0.6_Freebsd_x86_64.tar.gz
tenv_.v1.0.6_Linux_arm64.tar.gz
tenv_.v1.0.6_Linux_armv6.tar.gz
tenv_.v1.0.6_Linux_i386.tar.gz
tenv_.v1.0.6_Linux_x86_64.tar.gz
tenv_.v1.0.6_Openbsd_arm64.tar.gz
tenv_.v1.0.6_Openbsd_armv6.tar.gz
tenv_.v1.0.6_Openbsd_i386.tar.gz
tenv_.v1.0.6_Openbsd_x86_64.tar.gz
tenv_.v1.0.6_Solaris_x86_64.tar.gz
tenv_.v1.0.6_Windows_arm64.zip
tenv_.v1.0.6_Windows_armv6.zip
tenv_.v1.0.6_Windows_i386.zip
tenv_.v1.0.6_Windows_x86_64.zip
tenv_v1.0.6_checksums.txt
Unnecessary periods are included in asset names.
tenv_.v1.0.6_Darwin_arm64.tar.gz
And the checksum file is also broken.
https://github.com/tofuutils/tenv/releases/download/v1.0.6/tenv_v1.0.6_checksums.txt
4364449a0e551c3731788c876ff9b35427a1a72bf5e2d50c0a1a91069a4da2a0 tenv_ v1.0.6_Darwin_arm64.tar.gz
79d8eeb773df8a5b3c5b6bb520f8ed5a0e04a68425a99eb2498083b01aeaa3bc tenv_ v1.0.6_Darwin_x86_64.tar.gz
a5c2cf462981f98cfd5d39018d417486ba17f8e6219d5fd32ce9c27786ea6533 tenv_ v1.0.6_Freebsd_arm64.tar.gz
81a8d4423e03215a3d288f2c414234438c0a8bb5458dd8cf98aa76bbdf5180cb tenv_ v1.0.6_Freebsd_armv6.tar.gz
bcb72f4101ac52359d30fb815214829fbd938497970e088e3caba7238cbacd6f tenv_ v1.0.6_Freebsd_i386.tar.gz
218c9e118261b455cffcfae32ff45bb6c577bddfeeb4f448792926d596adb3a4 tenv_ v1.0.6_Freebsd_x86_64.tar.gz
e8f6dcdeb60eef051590a6348e2f630347f12c460fd200a4ca2e6f0237d58836 tenv_ v1.0.6_Linux_arm64.tar.gz
0185ac458dd03d4242b630fae6c1639eb616793e5b843e7a73170177bd755a98 tenv_ v1.0.6_Linux_armv6.tar.gz
37c8a456985f7cfe1e05f3f29c33acf44745083ea3c000c6a4316dbeeede0571 tenv_ v1.0.6_Linux_i386.tar.gz
b380debfa3885355ee69b585b31d7bb5833bf20ffc65b021ff0feac1fa4bb2f7 tenv_ v1.0.6_Linux_x86_64.tar.gz
58959365e5ae9235697af0282b381a43ff1a68f74d0ba5c1c5e3391b3f0b4d26 tenv_ v1.0.6_Openbsd_arm64.tar.gz
1e00dc6a1327a59ac506a4dd73babf82671f5a40654db785bffbf50277631c87 tenv_ v1.0.6_Openbsd_armv6.tar.gz
fc965301b9801a7f0c4e83cf611a24db65bc6ba75efd45564cf02a366fa2ab05 tenv_ v1.0.6_Openbsd_i386.tar.gz
d04c3f097fd843ffb382390b7a53487ab64a854cbc17323bf414f99ebcb08cfe tenv_ v1.0.6_Openbsd_x86_64.tar.gz
bf90f3bf9f2f2967b09dca80cd1075875c5b39cd260d4c8794b38b1b86a8f232 tenv_ v1.0.6_Solaris_x86_64.tar.gz
3ed3bac16cb5fb719b24971ca7dde1a3fcc6e17e4b610bf6622398d568ab003d tenv_ v1.0.6_Windows_arm64.zip
df6a8ab217ead5178e49813fd74141e1b384cbb70ca7002b0ab86c35cab5ff75 tenv_ v1.0.6_Windows_armv6.zip
c0ff7203a9f6bcf1e4ca30caf449a9089d5ecd4c462a4474d22390f08ef4c03f tenv_ v1.0.6_Windows_i386.zip
b17ece6981294330f0b705a07a8a064ee998919ca3119be9ac0c99be7bb87e58 tenv_ v1.0.6_Windows_x86_64.zip
Is your feature request related to a problem? Please describe.
Not a problem, just curious if a certain feature parity could be matched with the likes of setup-opentofu or setup-terraform GH Actions.
Both of these GH Action ship with their own wrapper script which exposes stdout
, stderr
, and exitcode
automatically by default. These outputs can be leveraged in subsequent steps, for example, to reproduce the proposed plan and/or fmt diff in a PR comment like so.
Is there a similar-ish equivalent for sourcing tenv outputs?
Describe the solution you'd like
I can imagine this is a "deceptively simple" request. The aforementioned setup-opentofu/terraform Actions are... Actions. Naturally, it's easier for them to supply a wrapper script with custom outputs which are particularly suited for use in CI automation.
Describe alternatives you've considered
While I've just used setup-opentofu/terraform directly with their wrappers enabled, I'm just as open to workaround suggestions using bash/shell within CI context.
Additional context
Thanks to @kvendingoldo for identifying tenv
as a good fit for DevSecTop/TF-via-PR-Comments, where I'm keen to use tenv
in a scenario which tests both terraform
and tofu
execution simultaneously.
Describe the solution you'd like
Perform the same actions when a .terraform-version
file is found, as when an .opentofu-version
file is found.
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#32
cc @skyzyx
Describe the bug
I tried to implement an install or upgrade routine controlling the version of tenv installed or upgraded.
I discovered that both version commands tenv --version
and tenv version
report the string "dev" as the current version.
To Reproduce
execute tenv --version
or tenv version
Expected behavior
Return the actually used version of the binary.
Environment (please complete the following information):
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#use-versiontf-file
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#31
cc @skyzyx
Is your feature request related to a problem? Please describe.
I'd like to have the ability to set a fallback version that tenv will use if there is no version available or no version in .tf files.
This way if I start a new project, it acts as if I installed a particular version of terraform as the default terraform on my system. This is also useful when scripting or things of that nature.
Right now if I use:
tfenv tf use 1.5.7
It overrides detecting the versions from my versions.tf
files, which makes it harder to switch between different projects that use different versions of terraform (especially due to a hard requirement to version pin software versions).
Describe the solution you'd like
tfenv tf use --fallback 1.5.7
mkdir ~/tmptenvtest
cd ~/tmptenvtest
terraform -v
cd ~
rmdir ~/tmptenvtest
Would show terraform version 1.5.7 is in use, even-though there is no files in that directory.
Describe alternatives you've considered
None
Additional context
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Follows #36 (comment)
A rework to include https://github.com/tofuutils/tenv/blob/main/versionmanager/manager.go#L162 within predicateReaders in https://github.com/tofuutils/tenv/blob/main/versionmanager/semantic/semantic.go#L61 would improve consistency (which will improve maintenability, as an example, it will make easier to change priorities).
Describe alternatives you've considered
None
Additional context
None
version files
to <details>
Is your feature request related to a problem? Please describe.
When running the proxy command terraform
, if the TF/Tofu version is not available and needs to be downloaded, there is no output.
The download can take a while depending on the end-user bandwidth, and it's not user-friendly to display nothing.
I would expect also to have this additional info:
From where tenv
took the decision to download the given TF version (a .terraform-version
file or env var, whatever).
From where tenv
fetches all the releases info. Previously we got this log:
Fetching all releases information from https://artifactory.example.com/artifactory/hashicorp/terraform
Any file that is downloaded in general (zip, SHASUMs, etc.)
Describe the solution you'd like
I would like to have a similar output as with tfenv:
❯ terraform fmt
version '1.5.5' is not installed (set by /Users/sphan02/terraform/.terraform-version). Installing now as TFENV_AUTO_INSTALL==true
Installing Terraform v1.5.5
Downloading release tarball from https://artifactory.example.com/artifactory/hashicorp//terraform/1.5.5/terraform_1.5.5_darwin_arm64.zip
############################################################################################################################################################################ 100.0%
Downloading SHA hash file from https://artifactory.example.com/artifactory/hashicorp//terraform/1.5.5/terraform_1.5.5_SHA256SUMS
Not instructed to use Local PGP (/Users/sphan02/git/terraform/tfenv/use-{gpgv,gnupg}) & No keybase install found, skipping OpenPGP signature verification
Archive: /var/folders/v5/8674lc4563d_n27g6998d0kc0000gn/T/tfenv_download.XXXXXX.s4JCoj7TiW/terraform_1.5.5_darwin_arm64.zip
inflating: /Users/sphan02/git/terraform/tfenv/versions/1.5.5/terraform
Installation of terraform v1.5.5 successful. To make this your default version, run 'tfenv use 1.5.5'
Describe alternatives you've considered
❯ TFENV_VERBOSE=true terraform fmt
Failed to read terragrunt file : open terragrunt.hcl: no such file or directory
Failed to read terragrunt file : open terragrunt.hcl.json: no such file or directory
Scan project to find tf files
No compatible version found locally, search a remote one...
Can not read remote conf : open /Users/sphan02/.tenv/remote.yaml: no such file or directory
Fetching all releases information from https://artifactory.example.com/artifactory/hashicorp/terraform/index.json
Installation of Terraform 1.7.1
Fetching release information from https://artifactory.example.com/artifactory/hashicorp/terraform/v1.7.1/index.json
Failed to detect a version allowing to call terraform : unexpected value returned by API
Additional context
I understand that according to the strict definition of a proxy command, it shouldn't alter any behavior, but to me, user experience is more important, and I doubt that adding these outputs would dramatically prevent anyone using the TF output to be annoyed by these infos.
Describe the bug
In the root of my terraform module I have versions.tf
defined with the following:
terraform {
required_version = ">= 1.4.0"
...
}
}
When running tenv tf detect
, the following is returned:
No version files found for Terraform, fallback to latest-allowed strategy
Scan project to find .tf files
No compatible version found locally, search a remote one...
Fetching all releases information from https://releases.hashicorp.com/terraform/index.json
Error: no compatible version found
When using the --verbose
flag, I can see that it is searching for required versions in all submodules under modules/*
, examples under examples/*
, git-ignored local testing directories, .terraform/*
, etc. Essentially searching the entire repository and builds a list of 100 or so constraints.
To Reproduce
Steps to reproduce the behavior:
test
test/versions.tf
with the following content:terraform {
required_version = ">= 1.5.7"
}
test/example/versions.tf
with a conflicting version:terraform {
required_version = "1.5.5"
}
tenv tf detect -n
in the test
directoryError: no compatible version found
Expected behavior
tenv
would pull the required version from the versions.tf
file of the current directory only. Subdirectories should not be taken into account as they are not part of this Terraform configuration.
Environment (please complete the following information):
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#install-latest-implicit-version-for-beta-alpha-and-release-candidatesrc
Helps with testing Terraform code/modules against upcoming releases in a CI pipeline.
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#30
cc @skyzyx
Describe the solution you'd like
Please replicate this feature from tfswitch. https://tfswitch.warrensbox.com/Quick-Start/#install-latest-implicit-version-for-stable-releases
Additional context
It's backport of the original issue from tofuenv: tofuutils/tofuenv#29
cc @skyzyx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.