Giter Club home page Giter Club logo

Comments (4)

jpogran avatar jpogran commented on June 30, 2024 1

Hi @thenger thanks for including the log, as that's helpful here.

Both terraform.languageServer.terraform.path and terraform.languageServer.path are machine/remote scoped settings. This means you need to set them where the extension will run. For example, the path to the terraform binary might be in a different location/path inside WSL that it is on the host machine. This is to enable a scenario where you have terraform installed in c:/some/path/to/terraform.exe on your Windows host in your User settings and installed in /some/other/path/to/terraform in your Remote machine settings.

To set these settings in WSL, you can run the Preferences: Open Remote Settings command from the Command Palette (F1) or by selecting the Remote tab in the Settings editor. Then inout the correct path in the chosen setting.

FWIW, you don't have to set terraform.languageServer.terraform.path if the remote machine already has the terraform binary installed, it just has to be in environment variable PATH on the remote machine so that it can be resolved by the extension at runtime.

You shouldn't have to change the terraform.languageServer.path setting as that is detected by the extension at runtime, and by default it's pointed to the terraform-ls binary that is shipped with the extension and gets put in the right place when you use WSL. You would only need to set it if you are using terraform-ls from an outside install, which is not common.

from vscode-terraform.

thenger avatar thenger commented on June 30, 2024

eh
ok. thank you for your quick response !

It appears that I had tested some stuffs and ended up modifying the "Remote JSON settings" (without noticing) and added the following :

 "terraform.languageServer.path": "~/.local/bin/terraform",

and either because it's not the terraform-ls bin or because ~ is not expanded (but I think it's the later)
it was never going to work

now my config works : I removed every config related to hashicorp and works as I expected

Sorry for the time loss and thanks again

from vscode-terraform.

radeksimko avatar radeksimko commented on June 30, 2024

Glad it got resolved.

from vscode-terraform.

github-actions avatar github-actions commented on June 30, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

from vscode-terraform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.