You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the 2.0.0-rc.2 returns an error if there's no terraform scripts on the root level.
It's common to open the vscode, and the terraform scripts residing on sub-folders.
e.g.:
/
|---/images
|---/terraform
|---/somethingelse
Even if the sub-folder with terraform scripts being previously terraform init, the error occurs.
A VSCode Notification with the message:
"❌ Workspace not initialized. Please run 'terraform ini' in /...".
And, of course, if you try to terraform init on the root level says that is terraform empty.
Error:
2020/06/09 12:50:25 exec.go:142: Waiting for command to finish ...
[Error - 12:50:25 PM] Server initialization failed.
Message: Workspace not initialized. Please run `terraform init` in /Users/xxx/terraform-Playground
Code: -32098
2020/06/09 12:50:25 server.go:469: Received 1 new requests
2020/06/09 12:50:25 server.go:165: Processing 1 requests
2020/06/09 12:50:25 server.go:223: Checking request for "shutdown":
2020/06/09 12:50:25 rpc_logger.go:29: Incoming request for "shutdown" (ID 1):
2020/06/09 12:50:25 rpc_logger.go:50: Response to "shutdown" (ID 1): null
2020/06/09 12:50:25 server.go:204: Completed 1 requests [214.997µs elapsed]
2020/06/09 12:50:25 server.go:469: Received 1 new requests
2020/06/09 12:50:25 server.go:165: Processing 1 requests
2020/06/09 12:50:25 server.go:223: Checking request for "exit":
2020/06/09 12:50:25 rpc_logger.go:29: Incoming notification for "exit":
2020/06/09 12:50:25 schema_storage.go:116: error obtaining schemas: Unable to retrieve schemas: failed to get schemas: Execution of ["terraform" "providers" "schema" "-json"] canceled.
signal: killed
Steps to replicate:
create a folders with files that are not terraform scripts
create a sub-folder test/terraform with the terraform scripts
run terraform init on the terraform sub-folder
open vscode with the vscode-terraform extension enabled
The text was updated successfully, but these errors were encountered:
junior
changed the title
the extension should allow workspaces with scripts on the root level
the extension should allow workspaces with no tf scripts on the root level
Jun 9, 2020
Hi @junior
Thank you for trying out the new release candidate and providing that early feedback!
You are absolutely right that we should support the setup you described without errors. There are existing issues tracking the work towards solving this:
Treat schema availability as not essential terraform-ls#83 which is about not erroring when you open any folder that doesn't have plugin cache - either because it's genuinely not been init'd or because it's just not a Terraform workspace with any *.tf files.
Generally speaking this is something we need to solve on the server side, rather than in the extension and I would encourage you to subscribe to the linked issues until we do so.
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 context necessary to investigate further.
ghost
locked and limited conversation to collaborators
Jul 10, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently the 2.0.0-rc.2 returns an error if there's no terraform scripts on the root level.
It's common to open the vscode, and the terraform scripts residing on sub-folders.
e.g.:
/
|---/images
|---/terraform
|---/somethingelse
Even if the sub-folder with terraform scripts being previously
terraform init
, the error occurs.A VSCode Notification with the message:
And, of course, if you try to
terraform init
on the root level says that is terraform empty.Error:
Steps to replicate:
vscode-terraform
extension enabledThe text was updated successfully, but these errors were encountered: