Extension complaining Terraform CLI is not installed when it is
See original GitHub issueI installed v2.9.1 of the extension. When VSCode window launches, I get the notification:
Terraform (CLI) is required. Please install Terraform or make it available in $PATH
However, I have terraform installed to /usr/local/bin which is in both my $PATH and in $PATH for root, so I don’t know why it reports it as not being there
# ls -l `which terraform`
-rwxr-xr-x 1 n0304144 82171776 Jan 6 14:21 /usr/local/bin/terraform
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Install Terraform - HashiCorp Developer
Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker...
Read more >HOW TO INSTALL TERRAFORM EXTENSION ON VS CODE
The HashiCorp Terraform Visual Studio Code (VS Code) extension adds syntax highlighting and other editing features for Terraform files using ...
Read more >Terraform Init - Command Overview with Quick Usage Examples
In this post, I will explain what the terraform init command is used for, what it does, and when to run it. I...
Read more >Troubleshooting Omnibus GitLab installation issues
The reason for this is that Omnibus GitLab package with external database has no way of confirming if the extension exists, and it...
Read more >Infrastructure as Code - An intro - Part 5 - Using Terraform
Note: I'm going to assume that you have the Azure CLI installed, ... To install the Terraform extension in VS Code, you just...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I installed Terraform using
brew.I actually did a couple of tests now by quitting VSCode completely (force quit via Activity Monitor) then tried to open it via Spotlight and also via Dock. Both ways worked and Terraform was recognized. So, in my case, this is only an issue when the MacOS restores the system.
Seems like someone reported something along those lines, but unfortunately it was closed without resolution: https://github.com/microsoft/vscode/issues/44060
It’s puzzling that downgrading the extension addressed the issue for you – the error you’re seeing is coming from the language server, which is on its own release cycle. Here’s the discussion from a similar issue that was reported: https://github.com/hashicorp/vscode-terraform/issues/552#issuecomment-775037784
Can we give this a try? Set the Terraform path manually in the extension settings and upgrade to the newest extension version.