intellij-hcl icon indicating copy to clipboard operation
intellij-hcl copied to clipboard

Support calling terraform located "in" wsl / tfenv

Open G-Rath opened this issue 4 years ago • 2 comments

I'm on Windows, and using wsl + tfenv to manage my actual terraform installs.

It'd be great if intellij-hcl supported utilizing that.

Bonus points if it's possible to hook into tfenv directly so that it "just works" version-wise.

I'm happy to help where I can, and can run "tests" on my machine if you don't have a Windows setup on hand :)

G-Rath avatar Aug 14 '19 01:08 G-Rath

As an example of the issue I'm seeing with this, setting the location of Terraform to \\wsl$\<distro>\home\<username>\.tfenv\bin\terraform results in this error when trying to use the Terraform build configurations:

"C:\Program Files (x86)\JetBrains\PyCharm 2020.3.3\bin\runnerw64.exe" \\wsl$\<distro>\home\<username>\.tfenv\bin\terraform init
runnerw.exe: CreateProcess failed with error 193: %1 is not a valid Win32 application.


Process finished with exit code 193

KyleMarMc avatar Jul 06 '21 20:07 KyleMarMc

tfenv is configured differently for me. Here's an example:

❯ which terraform
/home/linuxbrew/.linuxbrew/bin/terraform
❯ which terraform
/home/linuxbrew/.linuxbrew/bin/terraform
❯ terraform version
Terraform v1.1.7
on linux_amd64

Your version of Terraform is out of date! The latest version
is 1.2.5. You can update by downloading from https://www.terraform.io/downloads.html
❯ tfenv use 0.12.31
Switching default version to v0.12.31
Switching completed
❯ which terraform
/home/linuxbrew/.linuxbrew/bin/terraform
❯ terraform version
Terraform v0.12.31

So I assume whatever solution is decided on will have to be able to point to terraform in different locations

ImIOImI avatar Jul 25 '22 15:07 ImIOImI