Terraform VSCode Extension while using Terraform Cloud

Hi There,

I may have missed something in my searching and reading. It looks as if in order to use the TF Extension for VSCode, a workspace must be initialized (terraform init) to use the extension properly.

I’m using Terraform cloud which means there are no TF working directories locally, and as such see “No root module found for … Functionality may be limited. You may need to run terraform init and reload your editor.”

Will the extension features provided by terraform-ls still be available while not having a proper root working directory that’s been initialized?

Hi @evanhfox,

The intended pattern here is for you to run terraform init locally while having a backend "remote" block in your configuration to tell Terraform CLI that you are using Terraform Cloud. You can then initialize a local development directory for your remote workspace, and thus have local access to the information that the language server needs to do its work.