Coder Social home page Coder Social logo

juliosueiras / terraform-lsp Goto Github PK

View Code? Open in Web Editor NEW
578.0 17.0 37.0 10.41 MB

Language Server Protocol for Terraform

License: MIT License

Makefile 0.42% Go 98.38% Nix 0.79% Shell 0.41%
terraform lsp lsp-server golang completion diagnostics

terraform-lsp's Introduction

Terraform LSP

Gitter terraform version Release FOSSA Status

This is LSP (Language Server Protocol) for Terraform

IMPORTANT: Currently there are two Terraform LSP repositories one of which is this repository and one of which is terraform-ls. Terraform-LS also contains details about this repository as well.

Current Focus: Terraform State Reading

The aim to have a unified lsp for terraform in the future, but for now there is two concurrent development with collabration to each other, this repo is aim for more experimental features, and the terraform-ls is aim for stableness

NOTE: This is first stage of the plugin, so is experimental

asciicast

Release

Release can be found here

Building

Requirement

it will need Go 1.14+

Native

  1. Download a release or clone the repository
  2. Run these commands from the terraform-lsp directory
GO111MODULE=on go mod download # Download the modules for the project
make      # Build the project. Alternatively run "go build"
make copy # Install the project

you may also specify a path to your preferred bin directory with the DST parameter

make copy DST="$your_preferred_bin_path" # Install the project

Nixpkgs

  • install nixpkgs
  • nix-build

Features

  • Variables complex completion (infinite nesting type)
  • Provider config completion
  • Resource (with infinite block, looking at you Kubernetes provider ;) ) completion
  • Data source completion
  • Dynamic Error Checking (Terraform and HCL checks)
  • Communication using provider binary (so it will support any provider as long as is built with terraform 0.12 SDK)
  • Module nesting (infinite as well) variable completion

Todo

All Todos are listed here

LSP Support Table

Feature Description Status
completion Autocompletion Supported for Resources/Data Sources/Variables/Locals, need support for nested interpolation
publishDiagnostics Error checking Supported, need to check for all possible errors
hover Hover on function/variables to get result Need to Implement
signatureHelp Get docs for resources/data sources name and params Need to Implement
declaration Go to Declaration Need to Implement
references Find all references Need to Implement
implementation Find all implementation Need to Implement (not sure if is applicable)
documentHighlight Resources/data sources/variables highlight Need to Implement
documentSymbol Resources/data sources/variables symbols Need to Implement
codeAction Refactoring actions Need to Implement
codeLens VSCode's code lens Need to Implement
formatting Formatting Need to Implement
rename Rename action Need to Implement
workspace Workspace support Need to Implement

Supported Editors

Editor Status Docs
Visual Studio Code Supported Link
Atom Supported Link
Vim Supported Link
Sublime Text 3 Supported Link
IntelliJ Supported Link
Emacs Supported Link

NOTE: Please create a issue for a editor that you want to test for

Bugs

  • Order of completion items
  • Issue with block
  • Issue on Terraform v0.15 due to different behaviour on where it store its provider json

Credits

License

FOSSA Status

terraform-lsp's People

Contributors

alindeman avatar andrewimeson avatar aubreyslavigne avatar beeceej avatar brayan-bautista-globant avatar calve avatar creachadair avatar denisse-dev avatar dohq avatar endzyme avatar fossabot avatar hectron avatar juliosueiras avatar pdecat avatar zimbatm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-lsp's Issues

Azurerm provider crash

Hi,

Haven't had a chance to dig into this one much, currently seeing the following when using in a set of tfs using azurerm provider.

2019-08-01T12:11:10.432+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.32.1_x4: plugin address: address=/tmp/plugin451092634 network=unix timestamp=2019-08-01T12:11:10.432+0100
2019-08-01T12:11:10.432+0100 [DEBUG] plugin: using plugin: version=5
2019/08/01 12:11:10 [TRACE] GRPCProvider: GetSchema
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x8dae7c]

goroutine 49 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc000440140, 0xc000294130, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0x11c
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(0xc000440140, 0xc000294130, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160 +0x5f
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc000440140, 0x11b4d40, 0xc0001e24e0, 0x11b5a00, 0x1954860, 0xee39a0, 0xc0004c2300, 0xfe87f9, 0x8, 0xc0003b1ce0, ...)
	/home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xa0
main.TextDocumentHover(0x11b4700, 0xc000e820f0, 0xc000688000, 0x64, 0x18, 0x1b, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:549 +0x28c
reflect.Value.call(0xe98380, 0x102c198, 0x13, 0xfe3c99, 0x4, 0xc000e821e0, 0x2, 0x2, 0xc00004dc90, 0xc00004ca00, ...)
	/home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:447 +0x454
reflect.Value.Call(0xe98380, 0x102c198, 0x13, 0xc000e821e0, 0x2, 0x2, 0xe3bc60, 0x18, 0x1)
	/home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:308 +0xa4
reflect.Value.Call-fm(0xc000e821e0, 0x2, 0x2, 0x1, 0xc0003308a0, 0x1)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x60
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11b4700, 0xc000e820f0, 0xc00025e900, 0xc000046cf0, 0xc000505ee8, 0x10, 0xc000505ee0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x22b
github.com/creachadair/jrpc2/handler.Func.Handle(0xc00000c600, 0x11b4700, 0xc000e820f0, 0xc00025e900, 0x0, 0x0, 0x11b4700, 0xc000e820f0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x44
github.com/creachadair/jrpc2.(*Server).invoke(0xc0004da000, 0x11b4640, 0xc00025e800, 0x11a9760, 0xc00000c600, 0xc00025e900, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1b0
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc000a48010, 0xc0004da000, 0xc000118000)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x101
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x13a
[Error - 12:11:10] Connection to server got closed. Server will not be restarted.

plugin exited error

lsp v 0.0.9, vs code 1.38.1

2019/09/19 08:52:41 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:41 [DEBUG] checking for provider in "."
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:41.064+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:41.089+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:41.095+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38412
2019-09-19T08:52:41.095+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:41.164+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:41.163+0100
2019-09-19T08:52:41.192+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin185691043 network=unix timestamp=2019-09-19T08:52:41.192+0100
2019-09-19T08:52:41.192+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:41 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:41.286+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38412
2019-09-19T08:52:41.286+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:41 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:41 [DEBUG] checking for provider in "."
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:41.287+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:41.314+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:41.321+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38446
2019-09-19T08:52:41.321+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:41.344+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:41.344+0100
2019-09-19T08:52:41.371+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin919539045 network=unix timestamp=2019-09-19T08:52:41.371+0100
2019-09-19T08:52:41.371+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:41 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:41.459+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38446
2019-09-19T08:52:41.459+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:41 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:41 [DEBUG] checking for provider in "."
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:41.460+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:41.483+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:41.488+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38447
2019-09-19T08:52:41.488+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:41.505+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:41.505+0100
2019-09-19T08:52:41.528+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin889594218 network=unix timestamp=2019-09-19T08:52:41.528+0100
2019-09-19T08:52:41.529+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:41 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:41.614+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38447
2019-09-19T08:52:41.614+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:41 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:41 [DEBUG] checking for provider in "."
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:41 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:41 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:41.615+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:41.638+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:41.644+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38448
2019-09-19T08:52:41.644+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:41.662+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:41.662+0100
2019-09-19T08:52:41.685+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin048865631 network=unix timestamp=2019-09-19T08:52:41.684+0100
2019-09-19T08:52:41.685+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:41 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:41.773+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38448
2019-09-19T08:52:41.773+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.092+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.122+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.131+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38449
2019-09-19T08:52:54.131+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.151+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.151+0100
2019-09-19T08:52:54.180+0100 [DEBUG] plugin: using plugin: version=5
2019-09-19T08:52:54.180+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin075286012 network=unix timestamp=2019-09-19T08:52:54.180+0100
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.270+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38449
2019-09-19T08:52:54.270+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.271+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.298+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.307+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38451
2019-09-19T08:52:54.307+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.327+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.327+0100
2019-09-19T08:52:54.355+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin131058526 network=unix timestamp=2019-09-19T08:52:54.355+0100
2019-09-19T08:52:54.355+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.440+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38451
2019-09-19T08:52:54.440+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.441+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.465+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.473+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38453
2019-09-19T08:52:54.473+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.491+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.491+0100
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.493+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.522+0100 [DEBUG] plugin: using plugin: version=5
2019-09-19T08:52:54.522+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: network=unix address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin295257136 timestamp=2019-09-19T08:52:54.522+0100
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.524+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.527+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38455
2019-09-19T08:52:54.527+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.547+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.547+0100
2019-09-19T08:52:54.576+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: network=unix address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin677451074 timestamp=2019-09-19T08:52:54.576+0100
2019-09-19T08:52:54.576+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.622+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38453
2019-09-19T08:52:54.622+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.623+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.650+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.651+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38457
2019-09-19T08:52:54.652+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.675+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.674+0100
2019-09-19T08:52:54.680+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38455
2019-09-19T08:52:54.680+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.681+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.704+0100 [DEBUG] plugin: using plugin: version=5
2019-09-19T08:52:54.704+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: network=unix address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin994488668 timestamp=2019-09-19T08:52:54.703+0100
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.710+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.712+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38459
2019-09-19T08:52:54.713+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.733+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.733+0100
2019-09-19T08:52:54.759+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin841232982 network=unix timestamp=2019-09-19T08:52:54.759+0100
2019-09-19T08:52:54.759+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:54.803+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38457
2019-09-19T08:52:54.803+0100 [DEBUG] plugin: plugin exited
2019-09-19T08:52:54.857+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38459
2019-09-19T08:52:54.857+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:54 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:54 [DEBUG] checking for provider in "."
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:54 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:54 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:54.857+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:54.883+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:54.891+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38461
2019-09-19T08:52:54.891+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:54.911+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:54.911+0100
2019-09-19T08:52:54.939+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: network=unix address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin768133344 timestamp=2019-09-19T08:52:54.939+0100
2019-09-19T08:52:54.939+0100 [DEBUG] plugin: using plugin: version=5
2019/09/19 08:52:54 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:55.028+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38461
2019-09-19T08:52:55.028+0100 [DEBUG] plugin: plugin exited
2019/09/19 08:52:55 [DEBUG] plugin dirs: []string{".", "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64", "...../.terraform.d/plugins", "...../.terraform.d/plugins/darwin_amd64", "...../go/bin"}
2019/09/19 08:52:55 [DEBUG] checking for provider in "."
2019/09/19 08:52:55 [DEBUG] checking for provider in "...../.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/19 08:52:55 [DEBUG] checking for provider in "...../Documents/...../terraform/modules/bastion/.terraform/plugins/darwin_amd64"
2019/09/19 08:52:55 [DEBUG] found provider "terraform-provider-aws_v2.20.0_x4"
2019/09/19 08:52:55 [DEBUG] checking for provider in "...../go/bin"
2019-09-19T08:52:55.028+0100 [INFO] plugin: configuring client automatic mTLS
2019-09-19T08:52:55.053+0100 [DEBUG] plugin: starting plugin: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-19T08:52:55.061+0100 [DEBUG] plugin: plugin started: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38463
2019-09-19T08:52:55.061+0100 [DEBUG] plugin: waiting for RPC address: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-19T08:52:55.080+0100 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-19T08:52:55.079+0100
2019-09-19T08:52:55.107+0100 [DEBUG] plugin: using plugin: version=5
2019-09-19T08:52:55.107+0100 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/var/folders/5s/79plwnws0vg4dbzssktq6lj80000gn/T/plugin230238562 network=unix timestamp=2019-09-19T08:52:55.107+0100
2019/09/19 08:52:55 [TRACE] GRPCProvider: GetSchema
2019-09-19T08:52:55.194+0100 [DEBUG] plugin: plugin process exited: path=...../.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=38463
2019-09-19T08:52:55.194+0100 [DEBUG] plugin: plugin exited ```

terraform-lsp crashes at initialization on Windows (Emacs)

I was getting the following error over and over on Windows using lsp-mode in Emacs. This was both with the 0.0.9 release and with a build from master (merging in #48 to resolve the xerrors issue). (My computer had to reboot for unrelated reasons between receiving the error and posting this so cannot post the exact errors).

go panic runtime error invalid memory address or nil pointer dereference

The stack pointed to langserver/did_open.go:12 specifically the fileURL definition. Comparing this to the lsp-mode logs it was trying to open a file located at /C:/Users/acmeuser/git/tf-test/main.tf since the original fileURL being passed was file:///C:/Users/acmeuser/git/tf-test/main.tf. This does not work for Windows since it defines the protocol as file:/// not file://. Updating with the below diff and recompiling resolved the issue.

I'm willing to open a PR for this change, however I'm aware it would also require updating to account for Windows vs Linux and I'm not familiar enough with Go to do so (without research first)

diff --git a/langserver/did_open.go b/langserver/did_open.go
index bc36ec5..6bd3a17 100644
--- a/langserver/did_open.go
+++ b/langserver/did_open.go
@@ -8,7 +8,7 @@ import (
 )

 func TextDocumentDidOpen(ctx context.Context, vs lsp.DidOpenTextDocumentParams) error {
-       fileURL := strings.Replace(string(vs.TextDocument.URI), "file://", "", 1)
+       fileURL := strings.Replace(string(vs.TextDocument.URI), "file:///", "", 1)
        DiagsFiles[fileURL] = tfstructs.GetDiagnostics(fileURL, fileURL)

        TextDocumentPublishDiagnostics(Server, ctx, lsp.PublishDiagnosticsParams{

Call to function "file" failed: no file exists at scripts/init.sh.

resource "openstack_compute_instance_v2" "master-1" {
...
  user_data       = file("./scripts/init.sh")
...

In VSCode there's an error:

Call to function "file" failed: no file exists at scripts/init.sh.

Though running terraform apply has no issues.

VSCode:

Version: 1.43.2
Commit: 0ba0ca52957102ca3527cf479571617f0de6ed50
Date: 2020-03-24T07:52:11.516Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 4.15.0-91-generic snap

Terraform extension 1.4.0

VSCode preserveFocus

Currently with terraform-lsp installed alongside the Terraform Extension for VSCode this plugin forces the Output window to steal window focus on occasion. There is another issue for VSCode where they state that extension authors need to add preserveFocus: true. This prevents a workflow disruption to the user by not forcing their editor to switch to the Output view. Issue comment linked below.
microsoft/vscode#31474 (comment)

Support resolving resources in neighboring files

If I have two terraform files next to each-other, resources in one are not found when the language server inspects the other, even though they work perfectly fine when placed in the same file.

Example:

# in main.tf
resource "aws_lambda_function" "function" {
  function_name = "foo"
  role        = aws_iam_role.foo.arn # squigglies under aws_iam_role here
  # more props
}

# in iam.tf
resource "aws_iam_role" "foo" {
   # props
}

The above config gives an error on the indicated line, saying "There's no variable named aws_iam_role". If I move the two resources to the same file, though, it does not report an error.

Support for terraform_remote_state

I am receiving the following message:

Data source terraform_remote_state does not exist Terraform [#, #]

The # characters represent the line and spacing. I'm receiving this while using the LSP server with version 1.4.75 of the VS Code extension mauve.terraform. The LSP server version is v0.0.5.

I use remote states extensively to reference resources created in different state files.

Thanks,
Tom

Blocks of type "host_header" are not expected here.

TF recently updated conditions for certain resources, in my case aws_alb_lister_rule ones.

  listener_arn = "${var.default_listener_arn}"
  priority     = 50

  action {
    type             = "forward"
    target_group_arn = "${module.foo.target_group_id}"
  }

  condition {
    host_header {
      values = ["foo.${var.dns_name}"]
    }
  }
}

Before it looked like this:

condition {
    field  = "host_header"
    values = ["foo.${var.dns_name}"]
  }

Http 403 : Install/Update update Language Server

When trying to install the 0.09 language server I get an unexpected http 403 error. Is there a way to turn on debugging to possibly capture more detailed logs. I am behind a proxy and proxy is set as required but wondering if this extension bypasses proxy settings?

Downloading Terraform language server failed with Error: Unexpected HTTP response: 403

Not getting completions for resource types

Built and in path. Writing resource " gives no options for any resources. Also, aws_ in the resource block doesn't start autocompletion. Other completion works fine. Once I have something like resource "aws_s3_bucket" "bucket" { I do get required fields.

I'm using coc.nvim. coc config looks like this:

    "terraform": {
      "command": "terraform-lsp",
      "filetypes": ["terraform", "tf"],
      "initializationOptions": {}
    }

set ft shows filetype=tf, and I have that added above. Additionally, having hashivim/vim-terraform installed doesn't cause a conflict for me like it did with some others, and changes the file type to filetype=terraform like expected.

No variable named "count".

The following config yields an error as indicated by the comment:

resource "random_string" "foo" {
  count  = 3
  length = 10
}

resource "random_string" "bar" {
  count  = 3
  length = 10
  keepers = {
    foo = random_string.foo[count.index].result # squigglies under "count"
  }
}

There is no variable named "count".Terraform Schema

Build errors

Just cloned this repo and run make:
% make
go build && cp ./terraform-lsp ~/.bin/ && cp ./terraform-lsp ~/

github.com/juliosueiras/terraform-lsp/helper

../juliosueiras/terraform-lsp/helper/file.go:41:3: cannot use diags (type "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics) as type "github.com/hashicorp/hcl2/hcl".Diagnostics in return argument
../juliosueiras/terraform-lsp/helper/file.go:41:53: impossible type assertion:
hclsyntax.Body does not implement "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Body (wrong type for Content method)
have Content(
"github.com/hashicorp/hcl2/hcl".BodySchema) ("github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/hcl2/hcl".Diagnostics)
want Content(
"github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodySchema) ("github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics)
../juliosueiras/terraform-lsp/helper/file.go:57:3: cannot use diags (type "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics) as type "github.com/hashicorp/hcl2/hcl".Diagnostics in return argument
../juliosueiras/terraform-lsp/helper/file.go:57:49: impossible type assertion:
hclsyntax.Body does not implement "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Body (wrong type for Content method)
have Content(
"github.com/hashicorp/hcl2/hcl".BodySchema) (
"github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/hcl2/hcl".Diagnostics)
want Content("github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodySchema) ("github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics)
../juliosueiras/terraform-lsp/helper/file.go:62:2: cannot use diags (type "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics) as type "github.com/hashicorp/hcl2/hcl".Diagnostics in return argument
../juliosueiras/terraform-lsp/helper/file.go:62:48: impossible type assertion:
hclsyntax.Body does not implement "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Body (wrong type for Content method)
have Content(
"github.com/hashicorp/hcl2/hcl".BodySchema) ("github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/hcl2/hcl".Diagnostics)
want Content(
"github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodySchema) (*"github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".BodyContent, "github.com/hashicorp/terraform/vendor/github.com/hashicorp/hcl2/hcl".Diagnostics)
../juliosueiras/terraform-lsp/helper/file.go:107:35: cannot use &currVar.Type (type *"github.com/hashicorp/terraform/vendor/github.com/zclconf/go-cty/cty".Type) as type *"github.com/zclconf/go-cty/cty".Type in argument to parseVariables
make: *** [Makefile:2: default] Error 2

Autocompletion in array stops after first item

Hi ๐Ÿ‘‹

Given the following base:

resource "azurerm_network_security_group" "rabbitmq-nsg" {
  name                = "rabbitmq-nsg"
  resource_group_name = azurerm_resource_group.rabbitmq.name
  location            = azurerm_resource_group.rabbitmq.location
   security_rule {
    source_port_ranges           = []
  }
}

If you want to populate source_port_ranges with a var it autocompletes all right.

resource "azurerm_network_security_group" "rabbitmq-nsg" {
  name                = "rabbitmq-nsg"
  resource_group_name = azurerm_resource_group.rabbitmq.name
  location            = azurerm_resource_group.rabbitmq.location
   security_rule {
    source_port_ranges           = [var.myvar]
  }
}

But if you want to add another item to source_port_ranges it does not autocomplete anymore

resource "azurerm_network_security_group" "rabbitmq-nsg" {
  name                = "rabbitmq-nsg"
  resource_group_name = azurerm_resource_group.rabbitmq.name
  location            = azurerm_resource_group.rabbitmq.location
   security_rule {
    source_port_ranges           = [var.myvar, var.my...]
  }
}

I'm using terraform-lsp v0.0.10 and VS Code 1.42.1 on MacOS.

Flag to change the location of tf-lsp.log

I would love to have the option to change the location of the tf-lsp.log file, or maybe an option to disable it altogether. I'm currently using this with coc-nvim and it works great, I just have to keep deleting those pesky log files. Thanks!

Plugin discovery Issue

Hi,

Awesome work on the LSP!

I'm seeing an issue with nested modules and provider discovery. In the sample I have following folder structure.

image

What I see is that discovery is attempted at /deployment/environment/logicapp/.terraform/plugins/ not at /deployment/environment/.terraform/plugins/ where the root of the terraform project is.

Error is as follows, happy to look at fixing this up but probably won't be any time in the next few days.

2019/07/22 10:16:34 (*errors.errorString)(0xc0001c64d0)(Failed to find plugin: template. Plugin binary was not found in any of the following directories: [., /home/lawrence/source/external/terraform-lsp, terraform.d/plugins/linux_amd64, /home/lawrence/source/hacks/-/pipeline/deployment/environment/logicapp/.terraform/plugins/linux_amd64, /home/lawrence/.terraform.d/plugins, /home/lawrence/.terraform.d/plugins/linux_amd64, /home/lawrence/go/bin])

Segfault with terraform 0.12

Opening file with migration to terraform 0.12 cause a segfault to lsp.

Here is the backtrace:

2019-05-23T12:30:18.114+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:18.142+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:18.142+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26719
2019-05-23T12:30:18.142+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:18.155+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:18.154+0200
2019-05-23T12:30:18.181+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:18.181+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin825300612 network=unix timestamp=2019-05-23T12:30:18.181+0200
2019-05-23T12:30:18.276+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26719
2019-05-23T12:30:18.276+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:18.276+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:18.301+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:18.302+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26737
2019-05-23T12:30:18.302+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:18.312+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:18.312+0200
2019-05-23T12:30:18.340+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin462253445 network=unix timestamp=2019-05-23T12:30:18.339+0200
2019-05-23T12:30:18.340+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:18.445+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26737
2019-05-23T12:30:18.445+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:18.446+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:18.471+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:18.471+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26755
2019-05-23T12:30:18.471+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:18.482+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:18.482+0200
2019-05-23T12:30:18.510+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:18.510+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: network=unix address=/tmp/plugin351310088 timestamp=2019-05-23T12:30:18.510+0200
2019-05-23T12:30:18.602+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26755
2019-05-23T12:30:18.602+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:18.603+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:18.629+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:18.629+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26770
2019-05-23T12:30:18.629+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:18.642+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:18.641+0200
2019-05-23T12:30:18.670+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin109120632 network=unix timestamp=2019-05-23T12:30:18.669+0200
2019-05-23T12:30:18.670+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:18.759+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26770
2019-05-23T12:30:18.759+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:18.759+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:18.785+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:18.785+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26789
2019-05-23T12:30:18.785+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:18.795+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:18.795+0200
2019-05-23T12:30:18.822+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:18.822+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin709689640 network=unix timestamp=2019-05-23T12:30:18.822+0200
2019-05-23T12:30:18.914+0200 [ERROR] plugin.terraform-provider-aws_v2.11.0_x4: reading plugin stderr: error="read |0: file already closed"
2019-05-23T12:30:18.914+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26789
2019-05-23T12:30:18.914+0200 [DEBUG] plugin: plugin exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x7b8029]

goroutine 46 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc0003a6a50, 0xc0000c09f8, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x15, 0x68)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0xe9
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0003a6a50, 0x1271d80, 0xc0003a28a0, 0x1272a80, 0x1a60720, 0xf1e3e0, 0xc000470c00, 0x1022fc5, 0x8, 0xc000ab6bb0, ...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xb3
main.TextDocumentHover(0x12717c0, 0xc00024a300, 0xc0007be900, 0x3f, 0x18, 0xa, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/src/github.com/juliosueiras/terraform-lsp/main.go:532 +0x286
reflect.Value.call(0xed2440, 0x1065600, 0x13, 0x101e524, 0x4, 0xc00024a930, 0x2, 0x2, 0x0, 0xc000211dd0, ...)
	/usr/lib/go/src/reflect/value.go:447 +0x461
reflect.Value.Call(0xed2440, 0x1065600, 0x13, 0xc00024a930, 0x2, 0x2, 0x2, 0xc00024a930, 0x1)
	/usr/lib/go/src/reflect/value.go:308 +0xa4
bitbucket.org/creachadair/jrpc2/handler.newHandler.func7(0x12717c0, 0xc00024a300, 0xc0001ef7c0, 0xc0000c5f70, 0xc00040a6f0, 0x10, 0xc00040a6e8)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:221 +0x20c
bitbucket.org/creachadair/jrpc2/handler.Func.Handle(0xc00000e4e0, 0x12717c0, 0xc00024a300, 0xc0001ef7c0, 0x0, 0x0, 0x12717c0, 0xc00024a300)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:23 +0x44
bitbucket.org/creachadair/jrpc2.(*Server).invoke(0xc0004980c0, 0x1271700, 0xc0001ef780, 0x1259320, 0xc00000e4e0, 0xc0001ef7c0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:294 +0x1aa
bitbucket.org/creachadair/jrpc2.(*Server).dispatch.func1(0xc000890050, 0xc0004980c0, 0xc00077d560)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:185 +0x101
created by bitbucket.org/creachadair/jrpc2.(*Server).dispatch
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:183 +0x13a
2019-05-23T12:30:25.559+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:25.588+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:25.588+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26819
2019-05-23T12:30:25.588+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:25.599+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:25.599+0200
2019-05-23T12:30:25.629+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin020993353 network=unix timestamp=2019-05-23T12:30:25.629+0200
2019-05-23T12:30:25.629+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:25.724+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26819
2019-05-23T12:30:25.724+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:25.724+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:25.751+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:25.751+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26837
2019-05-23T12:30:25.751+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:25.761+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:25.761+0200
2019-05-23T12:30:25.787+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin892045246 network=unix timestamp=2019-05-23T12:30:25.787+0200
2019-05-23T12:30:25.787+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:25.883+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26837
2019-05-23T12:30:25.883+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:25.884+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:25.910+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:25.910+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26852
2019-05-23T12:30:25.910+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:25.920+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:25.920+0200
2019-05-23T12:30:25.946+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin676906367 network=unix timestamp=2019-05-23T12:30:25.946+0200
2019-05-23T12:30:25.946+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:26.041+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26852
2019-05-23T12:30:26.041+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:26.042+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:26.067+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:26.067+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26868
2019-05-23T12:30:26.067+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:26.078+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:26.078+0200
2019-05-23T12:30:26.103+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin533214934 network=unix timestamp=2019-05-23T12:30:26.103+0200
2019-05-23T12:30:26.103+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:26.192+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26868
2019-05-23T12:30:26.192+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:26.192+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:26.217+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:26.217+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26884
2019-05-23T12:30:26.217+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:26.229+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:26.229+0200
2019-05-23T12:30:26.257+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin595326934 network=unix timestamp=2019-05-23T12:30:26.257+0200
2019-05-23T12:30:26.257+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:26.348+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26884
2019-05-23T12:30:26.348+0200 [DEBUG] plugin: plugin exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x7b8029]

goroutine 78 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc0007ec8c0, 0xc000228128, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x15, 0x68)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0xe9
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0007ec8c0, 0x1271d80, 0xc0003efc80, 0x1272a80, 0x1a60720, 0xf1e3e0, 0xc000442d00, 0x1022fc5, 0x8, 0xc0003956b0, ...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xb3
main.TextDocumentHover(0x12717c0, 0xc0002fc210, 0xc000a90940, 0x3f, 0x18, 0xa, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/src/github.com/juliosueiras/terraform-lsp/main.go:532 +0x286
reflect.Value.call(0xed2440, 0x1065600, 0x13, 0x101e524, 0x4, 0xc0002fc240, 0x2, 0x2, 0x0, 0xc0000eddd0, ...)
	/usr/lib/go/src/reflect/value.go:447 +0x461
reflect.Value.Call(0xed2440, 0x1065600, 0x13, 0xc0002fc240, 0x2, 0x2, 0x2, 0xc0002fc240, 0x1)
	/usr/lib/go/src/reflect/value.go:308 +0xa4
bitbucket.org/creachadair/jrpc2/handler.newHandler.func7(0x12717c0, 0xc0002fc210, 0xc0002f8ac0, 0xc0002f88f0, 0xc0001afef0, 0x10, 0xc0001afee8)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:221 +0x20c
bitbucket.org/creachadair/jrpc2/handler.Func.Handle(0xc00000e5c0, 0x12717c0, 0xc0002fc210, 0xc0002f8ac0, 0x0, 0x0, 0x12717c0, 0xc0002fc210)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:23 +0x44
bitbucket.org/creachadair/jrpc2.(*Server).invoke(0xc00048e0c0, 0x1271700, 0xc0000472c0, 0x1259320, 0xc00000e5c0, 0xc0002f8ac0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:294 +0x1aa
bitbucket.org/creachadair/jrpc2.(*Server).dispatch.func1(0xc0006b4010, 0xc00048e0c0, 0xc000398a20)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:185 +0x101
created by bitbucket.org/creachadair/jrpc2.(*Server).dispatch
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:183 +0x13a

Process terraform-lsp stderr<1> finished

Process terraform-lsp stderr finished
2019-05-23T12:30:59.431+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:59.463+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:59.464+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26948
2019-05-23T12:30:59.464+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:59.474+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:59.474+0200
2019-05-23T12:30:59.503+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin859107154 network=unix timestamp=2019-05-23T12:30:59.503+0200
2019-05-23T12:30:59.503+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:59.598+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26948
2019-05-23T12:30:59.598+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:59.599+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:59.624+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:59.624+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26967
2019-05-23T12:30:59.624+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:59.636+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:59.636+0200
2019-05-23T12:30:59.667+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin391166740 network=unix timestamp=2019-05-23T12:30:59.667+0200
2019-05-23T12:30:59.667+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:59.760+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26967
2019-05-23T12:30:59.760+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:59.760+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:59.786+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:59.786+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26984
2019-05-23T12:30:59.786+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:59.796+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:59.796+0200
2019-05-23T12:30:59.824+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:30:59.824+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin643352977 network=unix timestamp=2019-05-23T12:30:59.824+0200
2019-05-23T12:30:59.919+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=26984
2019-05-23T12:30:59.919+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:30:59.920+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:30:59.949+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:30:59.950+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27000
2019-05-23T12:30:59.950+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:30:59.961+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:30:59.961+0200
2019-05-23T12:30:59.991+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: network=unix address=/tmp/plugin418570099 timestamp=2019-05-23T12:30:59.991+0200
2019-05-23T12:30:59.991+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:00.082+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27000
2019-05-23T12:31:00.082+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:00.082+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:00.108+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:00.109+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27015
2019-05-23T12:31:00.109+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:00.120+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:00.120+0200
2019-05-23T12:31:00.146+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:00.146+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin697820018 network=unix timestamp=2019-05-23T12:31:00.146+0200
2019-05-23T12:31:00.236+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27015
2019-05-23T12:31:00.236+0200 [DEBUG] plugin: plugin exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x7b8029]

goroutine 57 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc00028d630, 0xc00045c228, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x15, 0x68)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0xe9
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00028d630, 0x1271d80, 0xc0005a2420, 0x1272a80, 0x1a60720, 0xf1e3e0, 0xc000694300, 0x1022fc5, 0x8, 0xc0003958c0, ...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xb3
main.TextDocumentHover(0x12717c0, 0xc0007e20f0, 0xc000440000, 0x3f, 0x18, 0xa, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/src/github.com/juliosueiras/terraform-lsp/main.go:532 +0x286
reflect.Value.call(0xed2440, 0x1065600, 0x13, 0x101e524, 0x4, 0xc0007e2150, 0x2, 0x2, 0x0, 0xc000545dd0, ...)
	/usr/lib/go/src/reflect/value.go:447 +0x461
reflect.Value.Call(0xed2440, 0x1065600, 0x13, 0xc0007e2150, 0x2, 0x2, 0x2, 0xc0007e2150, 0x1)
	/usr/lib/go/src/reflect/value.go:308 +0xa4
bitbucket.org/creachadair/jrpc2/handler.newHandler.func7(0x12717c0, 0xc0007e20f0, 0xc0003e6280, 0xc000526030, 0xc000a456f0, 0x10, 0xc000a456e8)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:221 +0x20c
bitbucket.org/creachadair/jrpc2/handler.Func.Handle(0xc0002f8580, 0x12717c0, 0xc0007e20f0, 0xc0003e6280, 0x0, 0x0, 0x12717c0, 0xc0007e20f0)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:23 +0x44
bitbucket.org/creachadair/jrpc2.(*Server).invoke(0xc000466180, 0x1271700, 0xc0003e6200, 0x1259320, 0xc0002f8580, 0xc0003e6280, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:294 +0x1aa
bitbucket.org/creachadair/jrpc2.(*Server).dispatch.func1(0xc000a1a020, 0xc000466180, 0xc0002fc3f0)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:185 +0x101
created by bitbucket.org/creachadair/jrpc2.(*Server).dispatch
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:183 +0x13a
2019-05-23T12:31:01.997+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:02.025+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:02.025+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27043
2019-05-23T12:31:02.025+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:02.035+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:02.035+0200
2019-05-23T12:31:02.066+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin034574102 network=unix timestamp=2019-05-23T12:31:02.065+0200
2019-05-23T12:31:02.066+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:02.162+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27043
2019-05-23T12:31:02.162+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:02.162+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:02.188+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:02.189+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27062
2019-05-23T12:31:02.189+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:02.199+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:02.199+0200
2019-05-23T12:31:02.226+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin254356097 network=unix timestamp=2019-05-23T12:31:02.226+0200
2019-05-23T12:31:02.226+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:02.321+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27062
2019-05-23T12:31:02.321+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:02.321+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:02.346+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:02.347+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27078
2019-05-23T12:31:02.347+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:02.357+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:02.357+0200
2019-05-23T12:31:02.383+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:02.383+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin808643181 network=unix timestamp=2019-05-23T12:31:02.383+0200
2019-05-23T12:31:02.477+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27078
2019-05-23T12:31:02.477+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:02.478+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:02.511+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:02.512+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27095
2019-05-23T12:31:02.512+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:02.523+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:02.523+0200
2019-05-23T12:31:02.554+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin130357397 network=unix timestamp=2019-05-23T12:31:02.553+0200
2019-05-23T12:31:02.554+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:02.647+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27095
2019-05-23T12:31:02.647+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:02.647+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:02.673+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:02.673+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27110
2019-05-23T12:31:02.673+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:02.683+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:02.683+0200
2019-05-23T12:31:02.712+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:02.712+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin511021452 network=unix timestamp=2019-05-23T12:31:02.712+0200
2019-05-23T12:31:02.805+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27110
2019-05-23T12:31:02.805+0200 [DEBUG] plugin: plugin exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x7b8029]

goroutine 81 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc0005a7770, 0xc00047c1a8, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x15, 0x68)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0xe9
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0005a7770, 0x1271d80, 0xc0000c45a0, 0x1272a80, 0x1a60720, 0xf1e3e0, 0xc000124600, 0x1022fc5, 0x8, 0xc0003876b0, ...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xb3
main.TextDocumentHover(0x12717c0, 0xc0006c2210, 0xc00003e180, 0x3f, 0x18, 0xa, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/src/github.com/juliosueiras/terraform-lsp/main.go:532 +0x286
reflect.Value.call(0xed2440, 0x1065600, 0x13, 0x101e524, 0x4, 0xc0006c23f0, 0x2, 0x2, 0x0, 0xc000253dd0, ...)
	/usr/lib/go/src/reflect/value.go:447 +0x461
reflect.Value.Call(0xed2440, 0x1065600, 0x13, 0xc0006c23f0, 0x2, 0x2, 0x2, 0xc0006c23f0, 0x1)
	/usr/lib/go/src/reflect/value.go:308 +0xa4
bitbucket.org/creachadair/jrpc2/handler.newHandler.func7(0x12717c0, 0xc0006c2210, 0xc0001c8100, 0xc0001c8ab0, 0xc00006aef0, 0x10, 0xc00006aee8)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:221 +0x20c
bitbucket.org/creachadair/jrpc2/handler.Func.Handle(0xc00047e540, 0x12717c0, 0xc0006c2210, 0xc0001c8100, 0x0, 0x0, 0x12717c0, 0xc0006c2210)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:23 +0x44
bitbucket.org/creachadair/jrpc2.(*Server).invoke(0xc0004c00c0, 0x1271700, 0xc000046b00, 0x1259320, 0xc00047e540, 0xc0001c8100, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:294 +0x1aa
bitbucket.org/creachadair/jrpc2.(*Server).dispatch.func1(0xc0007d84f0, 0xc0004c00c0, 0xc000389560)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:185 +0x101
created by bitbucket.org/creachadair/jrpc2.(*Server).dispatch
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:183 +0x13a

Process terraform-lsp stderr<1> finished

Process terraform-lsp stderr finished
2019-05-23T12:31:06.954+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:06.987+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:06.987+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27140
2019-05-23T12:31:06.987+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:06.999+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:06.998+0200
2019-05-23T12:31:07.026+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin709772024 network=unix timestamp=2019-05-23T12:31:07.026+0200
2019-05-23T12:31:07.026+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:07.130+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27140
2019-05-23T12:31:07.130+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:07.130+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:07.155+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:07.156+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27159
2019-05-23T12:31:07.156+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:07.165+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:07.165+0200
2019-05-23T12:31:07.192+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin975726059 network=unix timestamp=2019-05-23T12:31:07.192+0200
2019-05-23T12:31:07.192+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:07.285+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27159
2019-05-23T12:31:07.285+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:07.285+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:07.311+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:07.311+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27174
2019-05-23T12:31:07.311+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:07.323+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:07.323+0200
2019-05-23T12:31:07.349+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:07.349+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin701422577 network=unix timestamp=2019-05-23T12:31:07.349+0200
2019-05-23T12:31:07.440+0200 [ERROR] plugin.terraform-provider-aws_v2.11.0_x4: reading plugin stderr: error="read |0: file already closed"
2019-05-23T12:31:07.440+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27174
2019-05-23T12:31:07.440+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:07.440+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:07.471+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:07.471+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27189
2019-05-23T12:31:07.471+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:07.481+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:07.481+0200
2019-05-23T12:31:07.507+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin094107431 network=unix timestamp=2019-05-23T12:31:07.507+0200
2019-05-23T12:31:07.507+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:07.601+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27189
2019-05-23T12:31:07.601+0200 [DEBUG] plugin: plugin exited
2019-05-23T12:31:07.601+0200 [INFO]  plugin: configuring client automatic mTLS
2019-05-23T12:31:07.627+0200 [DEBUG] plugin: starting plugin: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 args=[/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4]
2019-05-23T12:31:07.627+0200 [DEBUG] plugin: plugin started: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27206
2019-05-23T12:31:07.627+0200 [DEBUG] plugin: waiting for RPC address: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4
2019-05-23T12:31:07.638+0200 [INFO]  plugin.terraform-provider-aws_v2.11.0_x4: configuring server automatic mTLS: timestamp=2019-05-23T12:31:07.638+0200
2019-05-23T12:31:07.665+0200 [DEBUG] plugin: using plugin: version=5
2019-05-23T12:31:07.665+0200 [DEBUG] plugin.terraform-provider-aws_v2.11.0_x4: plugin address: address=/tmp/plugin571700296 network=unix timestamp=2019-05-23T12:31:07.665+0200
2019-05-23T12:31:07.765+0200 [DEBUG] plugin: plugin process exited: path=/.../.terraform/plugins/linux_amd64/terraform-provider-aws_v2.11.0_x4 pid=27206
2019-05-23T12:31:07.765+0200 [DEBUG] plugin: plugin exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x7b8029]

goroutine 54 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc0006249b0, 0xc0004660c0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x15, 0x68)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0xe9
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc0006249b0, 0x1271d80, 0xc00043d8c0, 0x1272a80, 0x1a60720, 0xf1e3e0, 0xc000474e00, 0x1022fc5, 0x8, 0xc0003a68f0, ...)
	/home/bastien/projects/go/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xb3
main.TextDocumentHover(0x12717c0, 0xc000bc00f0, 0xc0002ba000, 0x3f, 0x18, 0xa, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/src/github.com/juliosueiras/terraform-lsp/main.go:532 +0x286
reflect.Value.call(0xed2440, 0x1065600, 0x13, 0x101e524, 0x4, 0xc000bc0120, 0x2, 0x2, 0x0, 0xc0001f7dd0, ...)
	/usr/lib/go/src/reflect/value.go:447 +0x461
reflect.Value.Call(0xed2440, 0x1065600, 0x13, 0xc000bc0120, 0x2, 0x2, 0x2, 0xc000bc0120, 0x1)
	/usr/lib/go/src/reflect/value.go:308 +0xa4
bitbucket.org/creachadair/jrpc2/handler.newHandler.func7(0x12717c0, 0xc000bc00f0, 0xc000228300, 0xc0002f62b0, 0xc000066ef0, 0x10, 0xc000066ee8)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:221 +0x20c
bitbucket.org/creachadair/jrpc2/handler.Func.Handle(0xc000327080, 0x12717c0, 0xc000bc00f0, 0xc000228300, 0x0, 0x0, 0x12717c0, 0xc000bc00f0)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/handler/handler.go:23 +0x44
bitbucket.org/creachadair/jrpc2.(*Server).invoke(0xc0000d8480, 0x1271700, 0xc000228280, 0x1259320, 0xc000327080, 0xc000228300, 0x0, 0x0, 0x0, 0x0, ...)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:294 +0x1aa
bitbucket.org/creachadair/jrpc2.(*Server).dispatch.func1(0xc000abc020, 0xc0000d8480, 0xc0002fc090)
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:185 +0x101
created by bitbucket.org/creachadair/jrpc2.(*Server).dispatch
	/home/bastien/projects/go/pkg/mod/bitbucket.org/creachadair/[email protected]/server.go:183 +0x13a

Process terraform-lsp stderr finished

Support vim-lsp

Can you support build via: go get -u github.com/juliosueiras/terraform-lsp ?

and can this plugin supports run through vim-lsp for easier integrated with vim? https://github.com/prabirshrestha/vim-lsp

tfvar's files not accepting variable definitions

# fake values for tests
name          = "NAME"
namespace     = "NAMESPACE"
chart_name    = "reactiveops-stable/rbac-manager"
chart_version = "1.1.2"

error

{
	"resource": "test.terraform.tfvars",
	"owner": "_generated_diagnostic_collection_name_#3",
	"severity": 8,
	"message": "An argument named \"name\" is not expected here.",
	"source": "Terraform",
	"startLineNumber": 2,
	"startColumn": 1,
	"endLineNumber": 2,
	"endColumn": 5
}
{
	"resource": "test.terraform.tfvars",
	"owner": "_generated_diagnostic_collection_name_#3",
	"severity": 8,
	"message": "An argument named \"namespace\" is not expected here.",
	"source": "Terraform",
	"startLineNumber": 3,
	"startColumn": 1,
	"endLineNumber": 3,
	"endColumn": 10
}

It keeps asking if it did a terraform init (which I did)

First of all thanks for this very nice project! I'm trying to get it to work in neovim with the coc.nvim language client, but it doesn't seem to work as expected:

image

I keep getting this message even after doing the terraform init. Is there anything I can look at or can you help to solve the problem? Thanks!

"Data source local_file does not exist"

Title, local_file does not seem to recognized.

Strangely, in one of three environments the error does not come up, but in the other two environments and in an isolated module the error comes up. I assume this is due to an external factor that simply prevents the error from showing, but figured it was worth mentioning.

Unable to download plugin from vscode

Hi!

When trying to install the plugin from mauve-vscode, however I get the following error:

Failed to download common providers: Error: ETXTBSY: text file is busy, copyfile '/home/gschaffer/.vscode/extensions/mauve.terraform-1.4.0/lspbin/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.25.0_x4' -> '/home/gschaffer/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.25.0_x4'

Any ideas how to solve this?

Correct command to run lsp

I run through lsp: \ 'cmd': {server_info->['terraform-lsp']}, is this correct cmmand to run?

I can't make it run as in demo, no completion menu when I trigger autocomplete inside resource's { as in demo.

Support for textDocument/formatting

Started using this LSP recently with vim and I have bindings to call textDocument/formatting to format the file I'm editing - it'd be great if terraform-lsp supported this function of the protocol.

Contribute

It seems like a lot of work to do. Do you need any help?

Support to specify plugins directory through the command line

This is useful if you have pre-downloaded plugins in your custom plugins directory.

I'm trying to use the terraform language server with visual studio code and the only way I can customize it is through command line arguments.

Currently the terraform language server doesn't work for me because it doesn't find the plugins in my custom folder.

Editing Terraform files causes a huge chain of plugin processes to start/kill - "GRPCProvider: GetSchema"

When I load VSCode, I'm able to have one interaction with the language server plugin (e.g. hitting alt+space for resource autocompletion). Then after that one interaction, there seems to be a huge spike in CPU/IO usage lasting almost a minute where the plugin doesn't respond and only shows "Loading...".

Upon looking at the language server output, it seems like lots of terraform-provider-aws processes are repeatedly starting and killing. Here's some of the log output - and note that this only encompasses about two seconds of time:

The processes seem to get killed off right after [TRACE] GRPCProvider: GetSchema.

2019/12/31 18:43:30 Server started
2019/12/31 18:43:39 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:39 [DEBUG] checking for provider in "."
2019/12/31 18:43:39 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:39.528-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:39.587-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:39.587-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6862
2019-12-31T18:43:39.588-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:39.639-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:39.638-0800
2019-12-31T18:43:39.708-0800 [DEBUG] plugin: using plugin: version=5
2019-12-31T18:43:39.708-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: network=unix address=/tmp/plugin648467804 timestamp=2019-12-31T18:43:39.706-0800
2019/12/31 18:43:39 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:39.845-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6862
2019-12-31T18:43:39.845-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:39 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:39 [DEBUG] checking for provider in "."
2019/12/31 18:43:39 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:39 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:39.846-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:39.883-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:39.883-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6886
2019-12-31T18:43:39.883-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:39.901-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:39.901-0800
2019-12-31T18:43:39.936-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: network=unix address=/tmp/plugin435468965 timestamp=2019-12-31T18:43:39.936-0800
2019-12-31T18:43:39.936-0800 [DEBUG] plugin: using plugin: version=5
2019/12/31 18:43:39 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:40.067-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6886
2019-12-31T18:43:40.067-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:40 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:40 [DEBUG] checking for provider in "."
2019/12/31 18:43:40 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:40.068-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:40.105-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:40.107-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6900
2019-12-31T18:43:40.107-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:40.128-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:40.128-0800
2019-12-31T18:43:40.162-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin085606913 network=unix timestamp=2019-12-31T18:43:40.162-0800
2019-12-31T18:43:40.162-0800 [DEBUG] plugin: using plugin: version=5
2019/12/31 18:43:40 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:40.280-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6900
2019-12-31T18:43:40.280-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:40 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:40 [DEBUG] checking for provider in "."
2019/12/31 18:43:40 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:40.281-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:40.314-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:40.314-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6913
2019-12-31T18:43:40.314-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:40.333-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:40.333-0800
2019-12-31T18:43:40.369-0800 [DEBUG] plugin: using plugin: version=5
2019-12-31T18:43:40.369-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin156006182 network=unix timestamp=2019-12-31T18:43:40.369-0800
2019/12/31 18:43:40 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:40.491-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6913
2019-12-31T18:43:40.491-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:40 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:40 [DEBUG] checking for provider in "."
2019/12/31 18:43:40 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:40.492-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:40.524-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:40.524-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6926
2019-12-31T18:43:40.524-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:40.542-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:40.542-0800
2019-12-31T18:43:40.575-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin636624704 network=unix timestamp=2019-12-31T18:43:40.575-0800
2019-12-31T18:43:40.575-0800 [DEBUG] plugin: using plugin: version=5
2019/12/31 18:43:40 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:40.698-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6926
2019-12-31T18:43:40.698-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:40 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:40 [DEBUG] checking for provider in "."
2019/12/31 18:43:40 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:40.699-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:40.735-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:40.736-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6938
2019-12-31T18:43:40.736-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:40.754-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:40.753-0800
2019-12-31T18:43:40.787-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin714374408 network=unix timestamp=2019-12-31T18:43:40.787-0800
2019-12-31T18:43:40.787-0800 [DEBUG] plugin: using plugin: version=5
2019/12/31 18:43:40 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:40.918-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6938
2019-12-31T18:43:40.918-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:40 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:40 [DEBUG] checking for provider in "."
2019/12/31 18:43:40 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:40 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:40.918-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:40.954-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:40.955-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6951
2019-12-31T18:43:40.955-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:40.972-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:40.972-0800
2019-12-31T18:43:41.006-0800 [DEBUG] plugin: using plugin: version=5
2019-12-31T18:43:41.006-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin411754137 network=unix timestamp=2019-12-31T18:43:41.006-0800
2019/12/31 18:43:41 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:41.124-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6951
2019-12-31T18:43:41.124-0800 [DEBUG] plugin: plugin exited
2019/12/31 18:43:41 [DEBUG] plugin dirs: []string{".", "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/davido/<REDACTED>/.terraform/plugins/linux_amd64", "/home/davido/.terraform.d/plugins", "/home/davido/.terraform.d/plugins/linux_amd64", "/home/davido/go/bin"}
2019/12/31 18:43:41 [DEBUG] checking for provider in "."
2019/12/31 18:43:41 [DEBUG] checking for provider in "/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-alicloud_v1.67.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-archive_v1.3.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-aws_v2.43.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-azurerm_v1.39.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-google_v3.3.0_x5"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-helm_v0.10.4_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-kubernetes_v1.10.0_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-random_v2.2.1_x4"
2019/12/31 18:43:41 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-12-31T18:43:41.124-0800 [INFO]  plugin: configuring client automatic mTLS
2019-12-31T18:43:41.158-0800 [DEBUG] plugin: starting plugin: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 args=[/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4]
2019-12-31T18:43:41.159-0800 [DEBUG] plugin: plugin started: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6964
2019-12-31T18:43:41.159-0800 [DEBUG] plugin: waiting for RPC address: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4
2019-12-31T18:43:41.176-0800 [INFO]  plugin.terraform-provider-aws_v2.43.0_x4: configuring server automatic mTLS: timestamp=2019-12-31T18:43:41.176-0800
2019-12-31T18:43:41.214-0800 [DEBUG] plugin.terraform-provider-aws_v2.43.0_x4: plugin address: address=/tmp/plugin099823748 network=unix timestamp=2019-12-31T18:43:41.214-0800
2019-12-31T18:43:41.214-0800 [DEBUG] plugin: using plugin: version=5
2019/12/31 18:43:41 [TRACE] GRPCProvider: GetSchema
2019-12-31T18:43:41.354-0800 [DEBUG] plugin: plugin process exited: path=/home/davido/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.43.0_x4 pid=6964
2019-12-31T18:43:41.354-0800 [DEBUG] plugin: plugin exited

How to get block auto-completed?

At about 0:05 into the demo it goes from res to this:

resource "" "" {
}

How is this done? Can't see the keypresses in the Asciinema videos.

Does it work in vim or only neovim?

I have built terraform-lsp and it is in my path. I have installed vim-lsp plugin, and configured it like this:

call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
call plug#end()

if executable('terraform-lsp')
    augroup lsp_terraform
        autocmd!
        autocmd User lsp_setup call lsp#register_server({
                    \ 'name': 'terraform-lsp',
                    \ 'cmd': {server_info->['terraform-lsp']},
                    \ 'whitelist': ['tf'],
                    \ })
        autocmd FileType tf setlocal omnifunc=lsp#complete
    augroup end
endif

With a new .tf, in insert mode I type "res", hit ctrl-x ctrl-o I get autocompletion list with "resource", "data", "module", "output", "variable", "provider", "terraform". I expect just "resource" not the whole list. It never seems to have the context, always provides that list, even inside a resource block, where it should be showing a list of fields.

Go 1.13 build fails

#> make
go build && cp ./terraform-lsp ~/.bin/ && cp ./terraform-lsp ~/
# golang.org/x/xerrors
../../../../pkg/mod/golang.org/x/[email protected]/adaptor_go1_13.go:16:14: undefined: errors.Frame
../../../../pkg/mod/golang.org/x/[email protected]/format_go1_13.go:12:18: undefined: errors.Formatter
make: *** [Makefile:2: default] Error 2

Just a heads up, 1.13 fails to go get ... and fails go build.

Support for Terraform 0.12(Root Level variables error check)

Hi,

I just installed this package and am using it with vim / coc.

I am using Terraform 0.12, which does not seem to be supported so far?
For example, somewhere I am using this:

namespace = kubernetes_namespace.mynamespace.metadata[0].name

and the reported error:

 [Terraform Schema] [E] There is no variable named "kubernetes_namespace".

Using the "old" terraform 0.11 notation with "${var.kubernetes_namespace.mynamespace.metadata[0].name" works fine

Add -version flag

It would be really convenient to have the plugin report its current version and maybe commit hash when called with -version (or --version) as e.g. Terraform does it already:

$ terraform -version
Terraform v0.12.6

This will make it possible to update and install terraform-lsp seamlessly.

request failed, reason: certificate has expired

Hello,

Using mauve.terraform when running install/update language server I get the following error.

request to https://api.github.com/repos/juliosueiras/terraform-lsp/releases failed, reason: certificate has expired

OS: osx catalina 10.15.2
vscode version: 1.43.2

Failed to install using sudo make.

My logs for building this ended with

go build -ldflags "-X main.GitCommit=$(git rev-list -1 HEAD) -X main.Version=$(git describe --tags) -X main.Date=$(date --rfc-3339=date)"
# golang.org/x/xerrors
/root/go/pkg/mod/golang.org/x/[email protected]/adaptor_go1_13.go:16:14: undefined: errors.Frame
/root/go/pkg/mod/golang.org/x/[email protected]/format_go1_13.go:12:18: undefined: errors.Formatter
make: *** [Makefile:2: default] Error 2

With
go build
I get

golang.org/x/xerrors

../../go/pkg/mod/golang.org/x/[email protected]/adaptor_go1_13.go:16:14: undefined: errors.Frame
../../go/pkg/mod/golang.org/x/[email protected]/format_go1_13.go:12:18: undefined: errors.Formatter

Running go build also ended with same errors.

Any help with installing this?

There is no variable named "terraform".

I'm using workspaces and have some code like this:

resource "aws_route53_zone" "child_zone" {
  name    = "${terraform.workspace}.${var.parent_domain_name}."
  comment = "Managed by Terraform"
  tags = merge(
    local.tags,
    {
      "Name" = "${terraform.workspace}.${var.parent_domain_name}."
    },
  )
}

When I open it up in VS Code, I get this:

There is no variable named "terraform". The full error is:

{
	"resource": "/PathToMy/terraform.tf",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "There is no variable named \"terraform\".",
	"source": "Terraform Schema",
	"startLineNumber": 2,
	"startColumn": 41,
	"endLineNumber": 2,
	"endColumn": 50
}

Not 100% sure its an issue with the LSP, but I thought I would report it here since it looks like it may be related.

Thanks!
Ryan

Smaller more incremental releases

Would it be possible to get smaller more incremental releases? it's painful to wait for smaller fixes while larger fixes are being worked on. It makes this project feel dead, it would encourage more people to step in and help

aws_route53_record variable not detected

01 resource "aws_route53_zone" "domain1-de-public" {
02   name    = "domain1.de"
03   comment = "Test domain"
04 }
05 
06 resource "aws_route53_record" "domain1-de-A" {
07   zone_id = aws_route53_zone.domain1-de-public.zone_id
08   name    = "domain1.de"
09   type    = "A"
10   records = ["192.168.1.1"]
11   ttl     = "3600"
12 }

Leads to an error:
There is no variable named "aws_route53_zone". Terraform Schema [ 7, 13]

Versions:

terraform-lsp 0.5
Terraform v0.12.5
provider.aws v2.21.1
mauve.terraform-1.4.50

crash: concurrent map writes

Hi, I'm getting a crash in the lsp, unfortunately I'm not sure which part of my terraform config is causing it

LSP v0.0.9
Terraform extension 1.4.0
OS: Windows

2019/11/04 11: 05: 22 Server started
fatal error: concurrent map writes

goroutine 50 [running]:
runtime.throw(0x100893b, 0x15)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/panic.go:608 +0x79 fp=0xc00000b8a8 sp=0xc00000b878 pc=0x42d889
runtime.mapassign_faststr(0xe991a0, 0xc000394c90, 0xc000070300, 0x57, 0x1957468)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/map_faststr.go:199 +0x3e1 fp=0xc00000b910 sp=0xc00000b8a8 pc=0x412911
main.TextDocumentDidOpen(0x11c8580, 0xc00044a180, 0xc000070240, 0x5e, 0xc00007f030, 0x9, 0x1, 0xc0002a0000, 0xe02, 0x0, ...)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:471 +0xf4 fp=0xc00000b9c0 sp=0xc00000b910 pc=0xd9c9e4
runtime.call128(0xc0002e4390, 0x1040ee8, 0xc00052a240, 0x4800000058)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/asm_amd64.s:524 +0x59 fp=0xc00000ba50 sp=0xc00000b9c0 pc=0x4568f9
reflect.Value.call(0xe8d440, 0x1040ee8, 0x13, 0xff7573, 0x4, 0xc00044a240, 0x2, 0x2, 0xc00051a380, 0xc00000bdc8, ...)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b fp=0xc00000bd18 sp=0xc00000ba50 pc=0x4c5dfb
reflect.Value.Call(0xe8d440, 0x1040ee8, 0x13, 0xc00044a240, 0x2, 0x2, 0xe51100, 0xc00044a240, 0x1)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab fp=0xc00000bd80 sp=0xc00000bd18 pc=0x4c586b
reflect.Value.Call-fm(0xc00044a240, 0x2, 0x2, 0x1, 0xc000004660, 0x1)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67 fp=0xc00000bdd8 sp=0xc00000bd80 pc=0x5670a7
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c8580, 0xc00044a180, 0xc00007bcc0, 0xc00007bb30, 0xc000527ee8, 0x10, 0xc000527ee0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232 fp=0xc00000be90 sp=0xc00000bdd8 pc=0x566d22
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0002054e0, 0x11c8580, 0xc00044a180, 0xc00007bcc0, 0x0, 0x0, 0x11c8580, 0xc00044a180)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b fp=0xc00000bed8 sp=0xc00000be90 pc=0x56592b
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000c83c0, 0x11c8500, 0xc00007e080, 0x11bd8e0, 0xc0002054e0, 0xc00007bcc0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1b7 fp=0xc00000bf60 sp=0xc00000bed8 pc=0x55e997
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc00007ef00, 0xc0000c83c0, 0xc0002e81b0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x108 fp=0xc00000bfc8 sp=0xc00000bf60 pc=0x561678
runtime.goexit()
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc00000bfd0 sp=0xc00000bfc8 pc=0x4583e1
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x141

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc0000c83c8)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc0000c83c0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
github.com/creachadair/jrpc2.(*Server).Wait(0xc0000c83c0, 0x1, 0x1)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:368 +0x38
main.main()
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:617 +0x515

goroutine 20 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0000bd7c0)
	/home/travis/gopath/pkg/mod/[email protected]/stats/view/worker.go:154 +0x107
created by go.opencensus.io/stats/view.init.0
	/home/travis/gopath/pkg/mod/[email protected]/stats/view/worker.go:32 +0x5e

goroutine 21 [syscall]:
os/signal.signal_recv(0x0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sigqueue.go:139 +0xa3
os/signal.loop()
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/os/signal/signal_unix.go:23 +0x29
created by os/signal.init.0
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/os/signal/signal_unix.go:29 +0x48

goroutine 28 [syscall, locked to thread]:
syscall.Syscall6(0x7ffed6962410, 0x5, 0x744, 0xc000399000, 0x1000, 0xc00000fb24, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/syscall_windows.go:183 +0xfc
syscall.ReadFile(0x744, 0xc000399000, 0x1000, 0x1000, 0xc00000fb24, 0x0, 0xc000528080, 0xc0003d6801)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/syscall/zsyscall_windows.go:313 +0xd5
syscall.Read(0x744, 0xc000399000, 0x1000, 0x1000, 0xa, 0x0, 0x8)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/syscall/syscall_windows.go:295 +0x6f
internal/poll.(*FD).Read(0xc0000ae000, 0xc000399000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/internal/poll/fd_windows.go:479 +0x1b3
os.(*File).read(0xc0000ac000, 0xc000399000, 0x1000, 0x1000, 0x538a55, 0xc0003d6960, 0xc000444490)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/os/file_windows.go:207 +0x55
os.(*File).Read(0xc0000ac000, 0xc000399000, 0x1000, 0x1000, 0xc0003d6960, 0xe27a00, 0xc0000d0620)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/os/file.go:108 +0x70
bufio.(*Reader).fill(0xc0000bb440)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/bufio/bufio.go:100 +0x116
bufio.(*Reader).ReadSlice(0xc0000bb440, 0xa, 0xffffffffffffffff, 0x0, 0xc0003d6960, 0xe27a00, 0xe994a0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/bufio/bufio.go:341 +0x3d
bufio.(*Reader).ReadBytes(0xc0000bb440, 0xc00000fe0a, 0xc00000fe58, 0x40bcd9, 0xc000096c90, 0x30, 0x28)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/bufio/bufio.go:419 +0x77
bufio.(*Reader).ReadString(0xc0000bb440, 0x42f70a, 0xc00000fe18, 0x4554b0, 0xc00006f800, 0x4)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/bufio/bufio.go:459 +0x3f
github.com/creachadair/jrpc2/channel.(*hdr).Recv(0xc0000bb4a0, 0xeb02a0, 0xc0002e2a80, 0xc000096c90, 0x1, 0x0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/channel/hdr.go:79 +0x80
github.com/creachadair/jrpc2.(*Server).read(0xc0000c83c0, 0x1ce0000, 0xc0000bb4a0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:434 +0x7e
github.com/creachadair/jrpc2.(*Server).Start.func1(0xc0000c83c0, 0x11c4900, 0xc0000bb4a0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:106 +0x96
created by github.com/creachadair/jrpc2.(*Server).Start
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:106 +0x16a

goroutine 29 [runnable]:
sync.(*Mutex).Lock(0xc00038b710)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/mutex.go:72 +0x2cd
sync.(*Cond).Wait(0xc00021d240)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/cond.go:57 +0xaf
github.com/creachadair/jrpc2.(*Server).nextRequest(0xc0000c83c0, 0x0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:155 +0x96
github.com/creachadair/jrpc2.(*Server).serve(0xc0000c83c0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:132 +0x82
github.com/creachadair/jrpc2.(*Server).Start.func2(0xc0000c83c0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:109 +0x5a
created by github.com/creachadair/jrpc2.(*Server).Start
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:109 +0x18c

goroutine 51 [semacquire]:
sync.runtime_Semacquire(0xc00007ef08)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc00007ef00)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
github.com/creachadair/jrpc2.(*Server).dispatch.func2(0xc000000008, 0x1041670)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:195 +0x63
github.com/creachadair/jrpc2.(*Server).serve.func1(0xc0000c83c0, 0xc00052a1e0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:140 +0x56
created by github.com/creachadair/jrpc2.(*Server).serve
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:138 +0x74

goroutine 66 [runnable]:
sync.(*Map).dirtyLocked(0x193ac00)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/map.go:360 +0x12c
sync.(*Map).LoadOrStore(0x193ac00, 0xfe49e0, 0xf05340, 0xe30a40, 0xc000204380, 0xe97f00, 0x0, 0x784c0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/map.go:227 +0x462
encoding/json.cachedTypeFields(0x11d3620, 0xf05340, 0x45147a, 0xf05340, 0x784c0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:1256 +0x145
encoding/json.newStructEncoder(0x11d3620, 0xf05340, 0xec7fc0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:653 +0x57
encoding/json.newTypeEncoder(0x11d3620, 0xf05340, 0xf05301, 0xeb3f40)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:425 +0x2bc
encoding/json.typeEncoder(0x11d3620, 0xf05340, 0x99)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:377 +0x1a7
encoding/json.valueEncoder(0xf05340, 0xc0002e4480, 0x99, 0xfdcf80)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:351 +0x63
encoding/json.(*encodeState).reflectValue(0xc0000ce000, 0xf05340, 0xc0002e4480, 0x99, 0x1930100)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:333 +0x46
encoding/json.(*encodeState).marshal(0xc0000ce000, 0xf05340, 0xc0002e4480, 0x30100, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:305 +0xfb
encoding/json.Marshal(0xf05340, 0xc0002e4480, 0xc0002e4480, 0x0, 0x193c280, 0xc0001a7848, 0x413165)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:160 +0x59
github.com/creachadair/jrpc2.(*Server).Push(0xc0000c83c0, 0x11c8580, 0xc0002e42d0, 0x10155dd, 0x1f, 0xf05340, 0xc0002e4480, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:334 +0x49b
main.TextDocumentPublishDiagnostics(0xc0000c83c0, 0x11c8580, 0xc0002e42d0, 0xc00003a180, 0x59, 0x1957468, 0x0, 0x0, 0x52, 0xee9b00)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:583 +0xbd
main.TextDocumentDidOpen(0x11c8580, 0xc0002e42d0, 0xc00003a180, 0x59, 0xc00038a150, 0x9, 0x1, 0xc0000e8400, 0x3fa, 0x0, ...)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:473 +0x1ff
reflect.Value.call(0xe8d440, 0x1040ee8, 0x13, 0xff7573, 0x4, 0xc0002e4360, 0x2, 0x2, 0x193c280, 0xc0001a7dc8, ...)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xe8d440, 0x1040ee8, 0x13, 0xc0002e4360, 0x2, 0x2, 0xe51100, 0xc0002e4360, 0x1)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc0002e4360, 0x2, 0x2, 0x1, 0xc000204220, 0x1)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c8580, 0xc0002e42d0, 0xc0002e0140, 0xc00021d2b0, 0xc000197ee8, 0x10, 0xc000197ee0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0002054e0, 0x11c8580, 0xc0002e42d0, 0xc0002e0140, 0x0, 0x0, 0x11c8580, 0xc0002e42d0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000c83c0, 0x11c8500, 0xc00007e080, 0x11bd8e0, 0xc0002054e0, 0xc0002e0140, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1b7
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc00038a050, 0xc0000c83c0, 0xc00037ee10)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x108
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x141

goroutine 67 [semacquire]:
sync.runtime_Semacquire(0xc00038a058)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc00038a050)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
github.com/creachadair/jrpc2.(*Server).dispatch.func2(0x8, 0x1041670)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:195 +0x63
github.com/creachadair/jrpc2.(*Server).serve.func1(0xc0000c83c0, 0xc0004480c0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:140 +0x56
created by github.com/creachadair/jrpc2.(*Server).serve
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:138 +0x74

goroutine 36 [semacquire]:
sync.runtime_Semacquire(0xc00038a1f8)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc00038a1f0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
encoding/json.typeEncoder.func1(0xc0004562c0, 0xf05340, 0xc0003942a0, 0x99, 0xc0001a0100)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:369 +0x3a
encoding/json.(*encodeState).reflectValue(0xc0004562c0, 0xf05340, 0xc0003942a0, 0x99, 0xf00100)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:333 +0x89
encoding/json.(*encodeState).marshal(0xc0004562c0, 0xf05340, 0xc0003942a0, 0xc0000d0100, 0x0, 0x0)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:305 +0xfb
encoding/json.Marshal(0xf05340, 0xc0003942a0, 0xc0003942a0, 0x0, 0xc0004c2000, 0xc0001a3848, 0x413165)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/encode.go:160 +0x59
github.com/creachadair/jrpc2.(*Server).Push(0xc0000c83c0, 0x11c8580, 0xc000394150, 0x10155dd, 0x1f, 0xf05340, 0xc0003942a0, 0x0, 0x0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:334 +0x49b
main.TextDocumentPublishDiagnostics(0xc0000c83c0, 0x11c8580, 0xc000394150, 0xc000478000, 0x5a, 0x1957468, 0x0, 0x0, 0x53, 0xee9b00)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:583 +0xbd
main.TextDocumentDidOpen(0x11c8580, 0xc000394150, 0xc000478000, 0x5a, 0xc0000320b0, 0x9, 0x15, 0xc000118480, 0x404, 0x0, ...)
	/home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:473 +0x1ff
reflect.Value.call(0xe8d440, 0x1040ee8, 0x13, 0xff7573, 0x4, 0xc000394180, 0x2, 0x2, 0xc0004c2000, 0xc0001a3dc8, ...)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xe8d440, 0x1040ee8, 0x13, 0xc000394180, 0x2, 0x2, 0xe51100, 0xc000394180, 0x1)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc000394180, 0x2, 0x2, 0x1, 0xc000386020, 0x1)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c8580, 0xc000394150, 0xc00021c0c0, 0xc00021c130, 0xc000193ee8, 0x10, 0xc000193ee0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0002054e0, 0x11c8580, 0xc000394150, 0xc00021c0c0, 0x0, 0x0, 0x11c8580, 0xc000394150)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000c83c0, 0x11c8500, 0xc00007e080, 0x11bd8e0, 0xc0002054e0, 0xc00021c0c0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1b7
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc000032090, 0xc0000c83c0, 0xc00047a090)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x108
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x141

goroutine 37 [semacquire]:
sync.runtime_Semacquire(0xc000032098)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc000032090)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
github.com/creachadair/jrpc2.(*Server).dispatch.func2(0x8, 0x1041670)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:195 +0x63
github.com/creachadair/jrpc2.(*Server).serve.func1(0xc0000c83c0, 0xc0002ea240)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:140 +0x56
created by github.com/creachadair/jrpc2.(*Server).serve
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:138 +0x74

goroutine 82 [runnable]:
encoding/json.checkValid(0xc000427000, 0xf5d, 0x1000, 0xc00019c028, 0xc000068800, 0x40c5ff)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/scanner.go:25 +0x14c
encoding/json.Unmarshal(0xc000427000, 0xf5d, 0x1000, 0xe16300, 0xc000068800, 0xe16300, 0xc000068800)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/encoding/json/decode.go:101 +0x6d
github.com/creachadair/jrpc2.(*Request).UnmarshalParams(0xc000068780, 0xe16300, 0xc000068800, 0xe16300, 0xc000068800)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/base.go:74 +0x73
github.com/creachadair/jrpc2/handler.newHandler.func4(0xc000068780, 0x30, 0x30, 0xf6fb20, 0xc0004b9ec8, 0x55acc9)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:179 +0xae
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c8580, 0xc0004385d0, 0xc000068780, 0xc0000687f0, 0xc0004b9ee8, 0x10, 0xc0004b9ee0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:217 +0x6e
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0002054e0, 0x11c8580, 0xc0004385d0, 0xc000068780, 0x0, 0x0, 0x11c8580, 0xc0004385d0)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000c83c0, 0x11c8500, 0xc00007e080, 0x11bd8e0, 0xc0002054e0, 0xc000068780, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1b7
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc0003d2010, 0xc0000c83c0, 0xc0001ac000)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x108
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x141

goroutine 83 [semacquire]:
sync.runtime_Semacquire(0xc0003d2018)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/runtime/sema.go:56 +0x40
sync.(*WaitGroup).Wait(0xc0003d2010)
	/home/travis/.gimme/versions/go1.11.13.linux.amd64/src/sync/waitgroup.go:130 +0x6b
github.com/creachadair/jrpc2.(*Server).dispatch.func2(0x8, 0x1041670)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:195 +0x63
github.com/creachadair/jrpc2.(*Server).serve.func1(0xc0000c83c0, 0xc0000ba060)
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:140 +0x56
created by github.com/creachadair/jrpc2.(*Server).serve
	/home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/server.go:138 +0x74
[Info  - 11:05:22 AM] Connection to server got closed. Server will restart.

100% CPU util on 0.0.10 on MacOS

OS: MacOS 10.15.3
VS Code: 1.42.1
Go: 1.13.8 darwin/amd64

After running the Install/Update Language Server command to upgrade to 0.0.10, the terraform-lsp process goes nuts and maxes out the CPU until it is killed. I tried leaving it a while to see if it would settle down but the process consumes all CPU time until it is killed, making the machine unusable until then.

image

My configuration:

"terraform.indexing": {
    "enabled": false,
    "liveIndexing": false,
    "delay": 500,
    "exclude": [
        ".terraform/**/*",
        "**/.terraform/**/*"
    ]
},
"terraform.languageServer": {
    "enabled": true,
    "args": []
},
"terraform.codelens.enabled": true,
"terraform.format": {
    "ignoreExtensionsOnSave": [
      ".tfsmurf"
    ]
  },
  "terraform.path": "terraform"

To fix the problem I disabled the language server and used the Install/Update command to downgrade to 0.0.9.

A colleague updated his language server and got the same issue.

plugin exited

Linux Ubuntu 18.04
go version go1.12.8 linux/amd64
Terraform 0.12.8
VScode 1.38.0
terraform extension 1.4.0
lspbin 5
VScode config
"terraform.indexing": {"enabled": false},
"terraform.languageServer": { "enabled": true }

2019/09/09 15:30:03 Server started
2019/09/09 15:30:03 [DEBUG] plugin dirs: []string{".", "/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/linux_amd64", "/home/xxx/uteis/tf-aws/.terraform/plugins/linux_amd64", "/home/xxx/.terraform.d/plugins", "/home/xxx/.terraform.d/plugins/linux_amd64", "/home/xxx/go/bin"}
2019/09/09 15:30:03 [DEBUG] checking for provider in "."
2019/09/09 15:30:03 [DEBUG] checking for provider in "/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/09 15:30:03 [DEBUG] checking for provider in "/home/xxx/uteis/tf-aws/.terraform/plugins/linux_amd64"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/09 15:30:03 [DEBUG] checking for provider in "/home/xxx/go/bin"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-aws_v2.27.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/09 15:30:03 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019-09-09T15:30:03.454-0300 [INFO] plugin: configuring client automatic mTLS
2019-09-09T15:30:03.539-0300 [DEBUG] plugin: starting plugin: path=/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 args=[/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4]
2019-09-09T15:30:03.541-0300 [DEBUG] plugin: plugin started: path=/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=22929
2019-09-09T15:30:03.541-0300 [DEBUG] plugin: waiting for RPC address: path=/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4
2019-09-09T15:30:03.600-0300 [INFO] plugin.terraform-provider-aws_v2.27.0_x4: configuring server automatic mTLS: timestamp=2019-09-09T15:30:03.599-0300
2019-09-09T15:30:03.668-0300 [DEBUG] plugin.terraform-provider-aws_v2.27.0_x4: plugin address: address=/tmp/plugin768617145 network=unix timestamp=2019-09-09T15:30:03.668-0300
2019-09-09T15:30:03.668-0300 [DEBUG] plugin: using plugin: version=5
2019/09/09 15:30:03 [TRACE] GRPCProvider: GetSchema
2019-09-09T15:30:03.960-0300 [DEBUG] plugin: plugin process exited: path=/home/xxx/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.27.0_x4 pid=22929
2019-09-09T15:30:03.960-0300 [DEBUG] plugin: plugin exited

Segafault on GetVarAttributeCompletion

vscode + mauve.terraform 1.4.0 + tip of terraform-lsp as of b05a499

Seems to be when a matching config is not found when resolving locals.

Using reasonably complex locals with for x in setproduct(a, b, c) construct.

Have patched around by adding

# tfstructs/vars.go line 76  
if found == nil {
  return request.Result
}

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xf5f2a9]

goroutine 75 [running]:
github.com/juliosueiras/terraform-lsp/tfstructs.GetVarAttributeCompletion(0xc0006372c0, 0x2, 0x2, 0x0, 0x0, 0x0, 0xc00048e380, 0x152cf20, 0xc0005fd3f0, 0xc0000400f7, ...)
	/home/awilkins/terraform-lsp/tfstructs/vars.go:76 +0x1319
github.com/juliosueiras/terraform-lsp/langserver.TextDocumentComplete(0x152c920, 0xc000457f50, 0xc0000400a0, 0x4e, 0x11, 0x24, 0x1, 0x0, 0x0, 0x0, ...)
	/home/awilkins/terraform-lsp/langserver/complete.go:324 +0x2996
reflect.Value.call(0x10b6580, 0x1291970, 0x13, 0x1241fad, 0x4, 0xc000457f80, 0x2, 0x2, 0x18, 0xc0004842c0, ...)
	/snap/go/5364/src/reflect/value.go:460 +0x5f6
reflect.Value.Call(0x10b6580, 0x1291970, 0x13, 0xc000457f80, 0x2, 0x2, 0x2, 0xc000457f80, 0x1)
	/snap/go/5364/src/reflect/value.go:321 +0xb4
github.com/creachadair/jrpc2/handler.newHandler.func7(0x152c920, 0xc000457f50, 0xc000182a80, 0x119d100, 0x42e84a, 0x10c3d40, 0x1d4c568)
	/home/awilkins/go/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x20a
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0002e1480, 0x152c920, 0xc000457f50, 0xc000182a80, 0x0, 0x0, 0x152c920, 0xc000457f50)
	/home/awilkins/go/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x44
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000ee300, 0x152c860, 0xc0005f60c0, 0x1510ae0, 0xc0002e1480, 0xc000182a80, 0x0, 0x0, 0x0, 0x0, ...)
	/home/awilkins/go/pkg/mod/github.com/creachadair/[email protected]/server.go:294 +0x1ce
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc00065c210, 0xc0000ee300, 0xc00060c510)
	/home/awilkins/go/pkg/mod/github.com/creachadair/[email protected]/server.go:185 +0x125
created by github.com/creachadair/jrpc2.(*Server).dispatch
	/home/awilkins/go/pkg/mod/github.com/creachadair/[email protected]/server.go:183 +0x13a

Add Eclipse Support

Can we add Eclipse support?

  • Provide setup documentation?
  • Provide a Marketplace Language Server plugin

There is no variable named "path". Did you mean "data"?

In code
data "template_file" "financeiro_service_params" { template = "${file("${path.module}/files/ServiceParams.xml")}" vars = { core_transacional = replace("corf-${var.app_version}", ".", "-") authorizer = replace("autf-${var.app_version}", ".", "-") cielo_switch = replace("swit-${var.app_version}", ".", "-") bin_switch = replace("swit-${var.app_version}", ".", "-") fdcorban_switch = replace("swit-${var.app_version}", ".", "-") libercard_switch = replace("swit-${var.app_version}", ".", "-") elavon_switch = replace("swit-${var.app_version}", ".", "-") } }

I get this error

There is no variable named "path". Did you mean "data"?

Call to function "file" failed: no file exists

I'm running into a minor issue with the file module in 0.9. Its not interpolating ${path.module} and cant find the file:
template = "${file("${path.module}/files/policies/cloudtrail_kms_policy.json.tpl")}"

Call to function "file" failed: no file exists at /files/policies/cloudtrail_kms_policy.json.tpl.Terraform

This is within a terraform module instantiated as a source from a directory.

Add Viper Configuration

I've been playing around with adding configuration via a YAML file. Something to the effect of:

logging:
    enabled: true                                                   
    loglevel: warn
    file:
        enabled: true                                               
        directory: .
        filename: tf-lsp.log

I just saw that more options were added. I'll pull those in and make a PR when I have something more useful

IDENT on file()

Hello, I'm using the latest version of this language server (version 10) with the vscode extension. I'm getting the IDENT error on the file() function like so:
Screenshot 2020-03-28 at 00 13 43
Running terraform plan or terraform apply works fine.
Thanks for the great work!

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.