-
Notifications
You must be signed in to change notification settings - Fork 38
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
Bug: GH Action runner's built-in terraform
binary over-rides the one installed by tenv
#98
Comments
That's probably a path resolution order problem, as you suggest elsewhere, I will look at setup-terraform (else i will dig in GA doc) to find what could be done on tenv side. |
The last Open Source version of Terraform is 1.5.7, you can call |
There is two thing depending on the goal :
That mean you need to locate |
Ah, I'm totally fine with being able to call tenv's terraform proxy in subsequent steps, as that's the norm with other setup- GH Actions anyway. In that case, since adding a system path PREpends it to the system Perhaps checking for the presence of the earlier |
I will add a |
Signed-off-by: Denis Vaumoron <[email protected]>
Signed-off-by: Denis Vaumoron <[email protected]>
Signed-off-by: Denis Vaumoron <[email protected]>
* add update-path command #98 * update README for #98 Signed-off-by: Denis Vaumoron <[email protected]>
No way, can't wait to give this a whirl upon release! |
1.7.0 is out |
That's fantastic, @dvaumoron, thank you! Should I enable some other flag/input to Asking as I ran the test workflow and the logs revealed the in-built Terraform still being favoured over |
Have you followed the example |
I haven't added that line yet as I thought that's being carried out automatically when
Perhaps I've misunderstood something, or the |
|
Ah, I get you now; the following now installs and adds the selected proxy to tenv terraform use 1.6.1
tenv update-path And I can confirm this works (!) as both Tofu and Terraform outputs are reported identically on this PR workflow. 🙌 One slight oddity is that the original/raw TF output is no longer shown within the workflow logs itself. This would be desirable have since:
Would it be possible to enable both |
Writing both could be done, could you open a new issue for this change ? |
Description
Following on from #93, it'd appear that VMs with built-in
terraform
binary—such as GH Action runner—overrides thetenv ... use
selection.Replication
Expected behavior
The output of
terraform --version
should match that of used/installed bytenv
.$ tenv terraform use 1.6.1 $ terraform --version ... Installation of Terraform 1.6.1 successful Written 1.6.1 in /home/runner/.tenv/Terraform/version Terraform v1.6.1 on linux_amd64
Actual behavior
The output of
terraform --version
reflects the built-in/pre-installed version ofterraform
, ignoringtenv
altogether.Installation of Terraform 1.6.1 successful Written 1.6.1 in /home/runner/.tenv/Terraform/version Terraform v1.7.5 on linux_amd64
Screenshots
Link to existing workflow log which demonstrates the output of the above replication steps.
Environment (please complete the following information):
Sourced from actions/runner-images:
Additional context
Cannot emphasise how appreciative I am of your efforts towards lowering the barrier-to-entry for O/TF, especially in CI contexts such as this. Thank you for your time!
The text was updated successfully, but these errors were encountered: