mongodb / terraform-provider-mongodbatlas

Terraform MongoDB Atlas Provider: Deploy, update, and manage MongoDB Atlas infrastructure as code through HashiCorp Terraform
https://registry.terraform.io/providers/mongodb/mongodbatlas
Mozilla Public License 2.0
244 stars 172 forks source link

Support the vscode terraform extension #19

Closed davearata closed 5 years ago

davearata commented 5 years ago

Originally posted here but it seems that repo is deprecated and this repo is its replacement.

The terraform extension for vscode uses a language server to provide information to the IDE. When I have this extension enabled within a project using the mongodb atlas provider I get an error in the logs. I have included below. It seems to be trying to call a function named GetSchema against the mongodb atlas provider and then exiting. I tried searching through the terraform-provider-mongodbatlas github repo and did not find any function named GetSchema. I did a similar search against the terrraform repo and it does seem to a be a function that is part of the terraform provider interface here

2019/09/04 17:42:51 [DEBUG] plugin dirs: []string{".", "/home/davidarata/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64", "/home/davidarata/.terraform.d/plugins", "/home/davidarata/.terraform.d/plugins/linux_amd64", "/home/davidarata/go/bin"}
2019/09/04 17:42:51 [DEBUG] checking for provider in "."
2019/09/04 17:42:51 [DEBUG] checking for provider in "/home/davidarata/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-aws_v2.26.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/04 17:42:51 [DEBUG] checking for provider in "/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-aws_v2.26.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-mongodbatlas_v0.1.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/04 17:42:51 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/04 17:42:51 [DEBUG] checking for provider in "/home/davidarata/.terraform.d/plugins"
2019/09/04 17:42:51 [DEBUG] checking for provider in "/home/davidarata/.terraform.d/plugins/linux_amd64"
2019-09-04T17:42:51.436-0400 [INFO]  plugin: configuring client automatic mTLS
2019-09-04T17:42:51.545-0400 [DEBUG] plugin: starting plugin: path=/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.1.0_x4 args=[/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.1.0_x4]
2019-09-04T17:42:51.545-0400 [DEBUG] plugin: plugin started: path=/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.1.0_x4 pid=19941
2019-09-04T17:42:51.547-0400 [DEBUG] plugin: waiting for RPC address: path=/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.1.0_x4
2019-09-04T17:42:51.565-0400 [INFO]  plugin.terraform-provider-mongodbatlas_v0.1.0_x4: configuring server automatic mTLS: timestamp=2019-09-04T17:42:51.565-0400
2019-09-04T17:42:51.661-0400 [DEBUG] plugin: using plugin: version=5
2019/09/04 17:42:51 [TRACE] GRPCProvider: GetSchema
2019-09-04T17:42:51.661-0400 [DEBUG] plugin.terraform-provider-mongodbatlas_v0.1.0_x4: plugin address: address=/tmp/plugin114849465 network=unix timestamp=2019-09-04T17:42:51.661-0400
2019-09-04T17:42:51.878-0400 [DEBUG] plugin: plugin process exited: path=/home/davidarata/projects/double-helix/.terraform/plugins/linux_amd64/terraform-provider-mongodbatlas_v0.1.0_x4 pid=19941
2019-09-04T17:42:51.878-0400 [DEBUG] plugin: plugin exited
PacoDw commented 5 years ago

Hello @davearata, thank you for your review, I didn't find some documentation at https://github.com/mauve/vscode-terraform on how to integrate other terraform plugins, it seems to be internally so I think the best idea is posting this issue in their repo to integrate this plugin.

If you have another issue referring to the behavior of this plugin just let us know.