Vscode-terraform: feat: Terraform 0.12 support (was hcl2 support)

Created on 1 Mar 2019  ·  259Comments  ·  Source: hashicorp/vscode-terraform

Hi!

Is there any plans to implement hcl2 support?

help wanted

Most helpful comment

I agree that this is a required feature and getting more urgent all the time. Sadly due to a new job and role I have no time at all to focus on this project except reviewing PR and doing releases.

It saddens me to say that I have for a few months now unsuccessfully tried to engage Hashicorp in the project which is why these new features are lagging.

I would love if the community could pull together here and help ship a better autocompletion and 0.12 support based on @juliosuerias language server.

I am very proud that we have a rather large user base (around 70k monthly actives, top 40 in downloads 🎉🎉) and it feels bad that I cannot devote more time.

Therefore I would really love to see this (rather big) change being shipped without my involvement as I fear without it the plugin will end up being rather useless.

Thanks everybody for using my plug-in it makes me proud to have you as users. 🎉

All 259 comments

+1, this feature would be exceedingly useful

HCL support is currently implemented by taking the HCL Go-library and feeding it through GopherJS to get a (very raw) JavaScript library (refer https://github.com/mauve/vscode-terraform/tree/master/hcl-hil) and then made into something useable in this part of the codebase: build.ts.

I do not have time myself to look into this right now but if somebody wants to give it a try, that is where you need to change stuff.

+1 I think this feature would really be helpful.

+1

I really would like to add this feature but I cannot do it myself as I do not have time, I can help somebody if they want to do it. I have tried to get Hashicorp to take over the project but they are not interested.

This does seem somewhat of an easy transition to hcl2. The API is different, but overall I think still embeddable in the same way. @mauve I will take a stab at it and let you know if I have questions; ~it will most likely involve the build & test process initially :)~ EDIT: Build and test was a snap.

@jnicholls Thanks for tackling this.

If the hcl2 library is capable of parsing hcl1 then I recommend just replacing it. in the meantime you might also want to replace the syntax-highlighting tmLanguage files with the official files from the hcl2 repo.

The data flow right now is hcl-hil.parseHcl -> build.ts -> FileIndex.ts, the only reason why build.ts was needed was because the output of parseHcl requires a lot of munging to be usuable. However now that you are touching this I can recommend trying to simplify everything at the same time.

The only reason why I added build.ts and did the complicated post-parsing of AST from the hcl-hil was because 1) emitting the all the types from the GoLang library would create a too large JS library, 2) I couldn't figure out how to add new types in Go and emit them to JS (🤣 and didn't want to spend too much time on trying to get it to work).

However I recommend that you might save yourself a lot of time if you make the Go-code emit something much closer to what FileIndex.ts wants it to be, that way you can remove build.ts.

Well, it looks like the AST is 100% different, haha. But, I think it is actually friendlier, and it's much more strongly typed. See https://github.com/hashicorp/hcl2/blob/master/hcl/hclsyntax/spec.md. I think we can walk this AST and provide a good result from parseHcl, but nothing really matches what you're looking for in FileIndex in terms of Sections and References, and thus walking the AST (albeit it will be quite different) is still necessary. I think we can do that walk on the Go side and get rid of build as well as parseHilWithPosition and bring back from parseHcl the desired sections, references and diagnostics if any (diagnostics and ranges are native to the hclsyntax parser, which is great, multiple diagnostics may be returned from a single pass to the parser, though your FileIndex interface only expects to return a single one). The diagnostics also will have did you mean ...? suggestions.

In the old HCL library a section refers to any top-level entity, for example: locals, terraform, variable, resource or data. This is also what I use Section for in the plugin. However the HCL library uses sections also for nested propertiers (the group in resource a b { group { a = b } }), this is different in the the plugin (where are properties (group or not) are just mapped to Properties).

The references were never part of the AST directly but they are extracted by build.ts after performing a parseHilWithPosition and traversing the AST produced by that call.

Currently FileIndex can have several diagnostics (FileIndex.diagnostics: Diagnostic[] = []), however as the parseHcl function in the HCL1 library fails when it encounters the first error FileIndex.fromString() (which uses build()) only returns a single Diagnostic if parsing fails. However as build() calls parseHilWithPosition() several times we have the chance to collect many HIL errors and add them to FIleIndex.diagnostics if we encounter them.

The current code assumes that FileIndex.fromString() returns either a FileIndex or a Diagnostic and a FileIndex with FileIndex.diagnostics populated if parsing succeeded (but with errors or warnings). If the HCL2 library is now finally able to recover and doesn't give up after encountering the first error I assume that you can just continue and using the code as before (but maybe changing FileIndex.fromString() and build() to return multiple diagnostics in case parsing fails.

If the HCL2 library is also able to recover from parse-errors and continue parsing we can also start using it more in the auto-completion provider. If you can find a HCL2 go function which (given a position in the text-document, or a position in the AST) gives us a list of possible next-tokens, that would be really awesome.

HCL2 will not continue parsing unfortunately. As evidenced by:

func TestParse(t *testing.T) {
    source := `variable "aws_access_key"
        default     = "xxx"
        description = "Amazon AWS Access Key"
     }

     variable "aws_secret_key" {
         default    = "xxx"
         description = "Amazon AWS Secret Key"
     }`
    file, diagnostics := hclsyntax.ParseConfig([]byte(source), "/blah/main.tf", hcl.InitialPos)
    for _, diag := range diagnostics {
        t.Log(diag.Error())
    }
    body := file.Body.(*hclsyntax.Body)
    hclsyntax.VisitAll(body, func(node hclsyntax.Node) hcl.Diagnostics {
        t.Logf("%T", node)
        return nil
    })
    t.FailNow()
}

output:

--- FAIL: TestParse (0.00s)
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:22: /blah/main.tf:1,26-2,1: Invalid block definition; A block definition must have block content delimited by "{" and "}", starting on the same line as the block header.
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Body
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Attributes
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Blocks
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Block
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Body
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Attributes
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Blocks
FAIL

Note that it did not parse the second Block, which would have looked like this:

--- FAIL: TestParse (0.00s)
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Body
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Attributes
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Blocks
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Block
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Body
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Attributes
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Blocks
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Block
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Body
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Attributes
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.Attribute
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.TemplateExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: *hclsyntax.LiteralValueExpr
    /Users/jarred.nicholls/code/vscode-terraform/hcl-hil/main_test.go:26: hclsyntax.Blocks
FAIL

I haven't looked closely at HCL1; are you saying that the ast.File returned from hcl.ParseString would incorporate the entire AST despite a parse error? It sounds like that's what you're saying, and thus how build() is able to go a step further and do parseHilWIthPosition() throughout all Value type 9 nodes...? Or, would it stop short in its AST construction as is seen in HCL2?

Thank you for the explanation on the FileIndex parts, and the expectation of Sections vs Properties! In HCL2, we'll have inner Blocks, which will in your definition become Properties instead of their own Sections.

Feel free to change FileIndex to suite whatever is best given the HCL2 library. Unless we need to keep both around.

HCL1 is not able to recover from any parse errors (to my knowledge), I was kinda hoping that HCL2 would be better at parsing here, maybe your example is just too hard to recover from. That means, to clarify, that hcl.ParseString does not return the AST when parsing fails.

  1. when parsing fails (because there is a HCL syntax error) then hcl1.ParseString() returns nil, err
  2. when parsing succeeds then hcl1.ParseString() returns ast, nil
  3. when parsing succeeds we visit the AST in build() and send type 9 nodes (value-strings) and heredoc (type 10 I think) to hil.ParseStringWithPosition() (or similar name)

    1. because hcl1.ParseString() has succeeded, we have an AST (which means we can build a FileIndex)

    2. so now errors in FileIndex.diagnostics are parse errors returned by hil.ParseString...()

At least hclsyntax.ParseConfig() (HCL2) returns a list of diagnostics which means that it can recover from some errors, if it returns an AST anyway I do not know. I think one of the big changes in HCL1 to HCL2 was that HCL and HIL were merged so that the HCL2 parser now needs to parse HIL aswell.

Thanks for giving it a try.

Ok, well it does seem that HCL2 is an improvement, and it does return multiple diagnostics (even though sometimes it'll complain about the same root issue multiple times, which means the parser isn't really "undoing" any state internally after encountering a syntax or grammar error in order to continue forward to the next expression/attr/block/etc. as if nothing bad happened). I don't think it could be used for auto-complete. There are functions for identifying a node by position, but not any to suggest next tokens. It does however have functions, given an execution context, to evaluate expressions...which could be useful.

From hclsyntax.ParseConfig:

// ParseConfig parses the given buffer as a whole HCL config file, returning
// a *hcl.File representing its contents. If HasErrors called on the returned
// diagnostics returns true, the returned body is likely to be incomplete
// and should therefore be used with care.

@mauve Hi, I created a LSP for terraform and maybe it will help with adding more HCL2 support to the extension? (since I did also do a client extension for vscode but is lacking syntax and indentation and etc)

Edit: I will try to add every possible LSP feature in the plugin, the most difficult one is going to be in-scope completion in for each loop

@juliosueiras That is great, a language server for Terraform is definitely a needed thing in the community. I'd imagine once it matures more that we'd simply plug into that. Short term I see a fairly clear path for integrating HCL2 into this extension that should only take a couple of hours of development time after it's well-understood how to integrate it without breaking too many interfaces on the first-order pass. I'd rather save a lot of refactoring and cleanup for a second pass. But ultimately yes, having LSP integration makes a lot of sense; if not entirely, as an option at least.

@jnicholls just want to ask, what do you consider the most require feature for the lsp to have? (since I want to get a general ideal of what to target next)

right now the LSP support:

  • Variables complex completion(infinite nesting type)
  • Provider Config completion
  • Resource(with infinite block) 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(inifinte as well) variable completion

I am expecting to the following implemented within this/next week:

  • Interpolation completion(so function inside of a template wrap, inside of list etc
  • More Dynamic Error Checking for RHS attributes
  • Locals(with expanded check)
  • Remote modules
  • Dynamic Block & For Each loop

after the above implemented, then I will be working on other LSP features(symbols, codelens, codeactions, etc)

Any feedback is greatly appreciated

Edit: also the reason I did the LSP is because I created the vim terraform plugin but is mostly regex solution, and with HCL2 allowing very very very nested variable structure, I decided to do a LSP instead for HCL2

@juliosueiras You are (and within a week or two, even more so) further than I expected! I think your to-do list is 100% aligned with what I’d suggest, prioritizing error checking and completions. Next I’d say symbols and anything else necessary for good hover and goto support. I’ll admit, I am not 100% familiar with the LSP specification and where the line is drawn between it and the features it powers in editors.

@juliosueiras @jnicholls I am fine with using an external language-server but then I think it needs to be either automatically downloaded and updated or bundled with the plugin, I used to have an external tool a while back and most users didn't figure out that they needed to install the tool which led to many support-requests.

the lsp is a single binary, so either option work

@jnicholls added Basic Dynamic Block completion https://asciinema.org/a/XhGFudMZ5mNCb6dndGbgc5iSu , right now will try to implement inferred type completion in for each

now there is also for each completion https://asciinema.org/a/245663

@juliosueiras @jnicholls what is the plan? are you guys working on integrating the language-server?

@mauve I am all for integrating the lsp into this plugin, right now I am mostly focus on making the lsp itself feature complete, so if there is anything that you guys need as high priority then I can do those first instead

@juliosueiras I use this extension every day, and I feel like it would greatly benefit from the LSP and HCL2 support (even if it isn't 100% complete yet). Seems like the official Terraform 0.12 release is imminent. Completely up to you what you prioritize of course.

EDIT: 0.12 was released minutes after commenting.

FYI 0.12 just came out so this is going to be pressing...
https://www.hashicorp.com/blog/announcing-terraform-0-12

I agree that this is a required feature and getting more urgent all the time. Sadly due to a new job and role I have no time at all to focus on this project except reviewing PR and doing releases.

It saddens me to say that I have for a few months now unsuccessfully tried to engage Hashicorp in the project which is why these new features are lagging.

I would love if the community could pull together here and help ship a better autocompletion and 0.12 support based on @juliosuerias language server.

I am very proud that we have a rather large user base (around 70k monthly actives, top 40 in downloads 🎉🎉) and it feels bad that I cannot devote more time.

Therefore I would really love to see this (rather big) change being shipped without my involvement as I fear without it the plugin will end up being rather useless.

Thanks everybody for using my plug-in it makes me proud to have you as users. 🎉

Thanks for all your hard work and the explanation, your plugin is well done
and appreciated by the terraform community.

Related to https://github.com/mauve/vscode-terraform/issues/84, if @juliosueiras can assist with integrating his work into the plugin that'd be huge. I'd contribute but then I'd have to learn typescript and my result would probably be garbage anyways, but I'll be willing to at least give it a shot if we can't get to a solution because this extension is awesome and has vastly improved my terraform productivity.

If the hcl2 library is capable of parsing hcl1 then I recommend just replacing it. in the meantime you might also want to replace the syntax-highlighting tmLanguage files with the official files from the hcl2 repo.

@mauve What do you mean by "official files"? I have not found any...
How do they implement syntax highlight on their site btw?

If the hcl2 library is capable of parsing hcl1 then I recommend just replacing it. in the meantime you might also want to replace the syntax-highlighting tmLanguage files with the official files from the hcl2 repo.

@mauve What do you mean by "official files"? I have not found any...
How do they implement syntax highlight on their site btw?

there are tmLanguage files in the hcl2 repo at https://github.com/hashicorp/hcl2/tree/master/extras/grammar.

Hi All, I see I'm there is a quite a thread about syntax highlighting support for ver 12.

Since Terraform officially releases v12 is there any timeline when we can get this to work?

Hello,

I took a stab at getting the LSP that @juliosueiras is working on to integrate with a VSCode Extension, and I had some success. There is a guide from Microsoft about LSPs and VSCode here.

The relevant snippet is modified from here. Note that I built the terraform-lsp binary and put it in /usr/local/bin/terraform-lsp.

export function activate(context: ExtensionContext) {
    let executable: Executable =
    {
        command: '/usr/local/bin/terraform-lsp',
    };

    // Options to control the language client
    let clientOptions: LanguageClientOptions = {
        // Register the server for plain text documents
        documentSelector: [{ scheme: 'file', language: 'plaintext' }],
        synchronize: {
            // Notify the server about file changes to '.clientrc files contained in the workspace
            fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
        }
    };

    // Create the language client and start the client.
    client = new LanguageClient(
        'languageServerExample',
        'Language Server Example',
        executable,
        clientOptions
    );

    // Start the client. This will also launch the server
    client.start();
}

Obviously, this isn't near ready, but I was able to open a text file and get some terraform code completion. I'll see if I can work on getting it integrated into this code base, but I'll likely need people to review it for me.

@dhdersch nice =) , btw I do have https://github.com/juliosueiras/vscode-languageclient-terraform that can be helpful for you (is mostly just to allow using terraform-lsp on vscode)

@dhdersch I will gladly review it for you.

Sorry everyone, been totally away/busy/distracted/busy/lazy/busy/etc. So with the LSP integration, will the deliberate HCL2 parsing still be necessary? It wouldn't be needed for diagnostic reports, but would it be needed for picking out the various references/sections for that navigation feature? Are we considering getting rid of that functionality and letting LSP drive the reference feature of VSCode native?

@dhdersch Nice! It seems like LSP integration will be mostly around curating the LSP binary itself (downloading it, installing it, upgrading it, restarting it, etc. etc.) versus actual integration work...?

@jnicholls I would think so. The issue I'm running into right now is that the vast majority of the plugin seems tightly coupled to the IndexAdapter, so there's likely a good bit of refactoring to do.

@dhdersch I guess the IndexAdapter and friends (as well as hcl-hil/) will no longer be needed after the language server has been integrated

Hi all! :wave:

I work on the Terraform team at HashiCorp, and worked on HCL 2. I use this extension in my VSCode every day, so I was excited to see this thread going on but sadly working on the Terraform 0.12.0 release itself was taking up too much time to engage properly here.

Of course there's still various Terraform 0.12.0 work going on, around responding to bug reports, releasing more providers, etc, and so I still don't have a whole lot of bandwidth here, but I wanted to respond to a few things in this thread in the hope that it's helpful. I really appreciate the efforts here to get HCL 2 support into this extension!


First, I want to talk a little about the HCL 2 parser's recovery behavior. As you were all discussing earlier, the HCL 2 parser _is_ able to continue parsing after it finds errors, but naturally that is a best-effort sort of thing and full recovery is not always possible. Sometimes, when things are particularly inscrutable, it will just give up and skip to the end of the file.

The recovery behavior is essentially a set of heuristics. For example, if an error occurs while a "body item" (an argument or a nested block header) is being parsed, it will seek forward looking for the next newline, counting brackets as it goes so that it has the best chance of leaving the scanner at the beginning of the next body item. A consequence of this approach is that if the error in question _involves_ brackets, it can defeat the heuristic.

In other cases, the heuristic is more specific: if the parser was in a state where it was trying to parse a construct that has both opening and closing marker tokens, it'll seek forward looking for the closing marker, trying to find the position just after that closing marker.

The intent of this recovery behavior was primarily for use-cases like Terraform's ability to hunt for its version constraint argument even if the syntax isn't valid, so that it can prefer to report "you are using the wrong version of Terraform" rather than a syntax error probably caused by that mismatch. It may also work for operations that query for constructs elsewhere in the document, away from where the user is currently typing, such as "Go To Definition".

I would expect that using it for autocomplete is likely to be a bit more hit-and-miss, but I saw that @juliosueiras got it working in the LSP project, so maybe it's working better than I expected.


I saw also mention of the TextMate grammars in the HCL repository. I want to caveat that those are pretty experimental and not heavily tested, since I had to divert my attention away from them to focus on other aspects of the codebase. At the time I was working on them I was using a local fork of vscode-terraform with the HCL2 definition replacing the one currently in the repository, and the basics seemed to be working, but I expect there are some details that are not working so well.

I'm not an expert on TextMate grammars and was learning as I worked on that, so if there are others here who are more knowledgeable about them and interested in working on them I'd love to collaborate! (Though as previously mentioned, I'm a little busy for a little while yet with other Terraform work.)


I was really surprised to see the language server from @juliosueiras! Especially that you managed to get lots of features of it working before Terraform 0.12 was even released. :grinning:

I previously started experimenting with a built-in language server, but didn't get very far before having to prioritize other work, :confounded: so I was really excited to see terraform-lsp.

In the long run, I think it would be interesting/valuable to have a built-in language server inside the Terraform binary itself, so that extensions like this can work with just a single terraform binary, though to be honest I don't think the Terraform team has the bandwidth to help with merging such a thing right now, even if @juliosueiras were interested in that... it's something I'd love to see about eventually, but I can see that having it in a separate repository you own is allowing you to iterate on it really quickly, and that's great!

@apparentlymart nice !! , a few things to add

1) regarding HCL2 Parser, I am mostly using Three level parsing , Single File Parsing on file changed -> Dir parsing for outside references -> Regex parsing for fallback(for loop structs,etc)

2) I will mostly focus on the LSP itself, and I have not much issue so far(mostly going to focus on full features completion, then move on to references counting, codelens, etc). I am def aiming for implementing full LSP features matrix

any feedback is always welcome =)

I saw also mention of the TextMate grammars in the HCL repository. I want to caveat that those are pretty experimental and not heavily tested, since I had to divert my attention away from them to focus on other aspects of the codebase.

@apparentlymart hi!
I've inspected these, and they are not suitable for this project as is: terraform distinguishes a larger number of entities...

Do you have any kind of formal language spec?

This plugin is awesome, alas the upgrade to v0.12 killed my syntax highlighting etc.. :(

It would be awesome if HashiCorp did an official version!! @apparentlymart :)

I've been using vscode-terraform to edit 0.12-style Terraform configurations for months now due to it being my primary dev environment and my having to test Terraform 0.12 :wink: so I can definitely relate to the frustration of things not working 100% here.

With that said, it seems like others are having a different experience to me, and I'm curious to understand in what way and why. For me, the extension has still been broadly working: syntax highlighting works well _enough_ (doesn't understand the new language constructs, but still works for the old syntax), autocomplete is still working in lots of cases, etc. The main annoyance I saw is that the embedded HCL/HIL parser in the extension of course cannot parse correctly any file using 0.12-only syntax, and so it produces error notations on the first non-interpolated expression in each file, which then means it cannot detect any _actual_ syntax errors in the file.

If that is the behavior others are seeing too, I wonder if a short-term fix here would be to have an option to disable the syntax check that is powered by the embedded HCL/HIL parsers while leaving everything else enabled and working as best it can. There would be no red error indications at all then, which is not ideal either by any means, but perhaps less annoying than the current situation.

Terraform 0.12 also includes terraform validate -json which is intended to allow an extension like this to outsource that sort of checking to the Terraform CLI itself. I don't know the internals of this extension well at all, so I'm not sure what it would take to integrate that, but perhaps it would make a suitable replacement for the embedded HCL/HIL parsers (for error-detection purposes only) to tide over until a more complete solution is available.

(Sadly of course terraform validate -json is not available in Terraforn 0.11, so I guess to use it would require either detecting somehow whether Terraform 0.12 or later is in use or having an option for the user to choose between these two behaviors explicitly. I don't think we currently have a straightforward way to ask Terraform directly what version it is right now -- other than the human-oriented terraform version command -- but we could perhaps add such a thing in a later 0.12.x release if it would be useful.)

I am having the same experience as you although I haven't used it enough to know exactly what is and isn't working. Tbh, I just disabled the plugin when I got problems that aren't actually problems. Upon realising this meant no syntax highlighting at all I turned it back on and put up with the false negatives.

I wonder if a short-term fix here would be to have an option to disable the syntax check that is powered by the embedded HCL/HIL parsers while leaving everything else enabled and working as best it can.

This sounds like a cracking idea!

@adamdry @apparentlymart Until this extension is ready, I have disabled it and created my own private extension that only provides syntax highlighting based on the TextMate grammer from the hcl2 repository.

I just published the extension, and it is available here if anyone wants to try it out.

EDIT: I'll also add that I tried integrating it with terraform-lsp and had some success. However, the LSP isn't quite ready yet as it crashes on many of my existing terraform files that I know for sure are valid.

Thanks, I'll give it a go!

JetBrains just released HCL2 support (I know it is a community plugin, but AFAIK it's being imported into IntelliJ, more on this here: https://github.com/VladRassokhin/intellij-hcl/issues/155

The plugin itself: https://plugins.jetbrains.com/plugin/7808-hashicorp-terraform--hcl-language-support

Tested it out right now and it's fine by me.

@apparentlymart it would be relatively easy to integrate the new 0.12 functionality of calling terraform validate -json, the class Runner keeps track of all terraforms it can find via configuration or by looking into $PATH and figures out the version of all terraforms.

@adamdry you can disable the HCL/HIL parsing by disabling the indexing feature (requires restart and not really tested) this will also disable a lot of other features but should at least remove the error markers

@astorath I tested the new intellij-hcl, and so far it look like more of a syntax upgrade 0.12 and basic top-level items(dynamic) instead of full completion/intellisense(for each, dynamic content, nested variables,etc)

@dhdersch sorry for current issues =( , is it ok if you can submit a issue on the repo so I can look into? I will aiming to have most top level features done within 2-3 weeks, and extra features that I have in mind like displaying evaluation of the interpolation, completion of inner remote state resource, etc done after that

I have never contributed to this project before, but I am keen to help out with this feature if i can. Are there any small grunt-work type jobs i can help with? Or is it one that is going to need people familiar with the whole thing?

@dhdersch @juliosueiras integrating the language-server at its current state might be preferable to waiting for it to be super-complete, that way we can start collecting metrics and crash logs from many users.

@MattFenner you could have a look at the tmLanguage files if you want to to make them compatible with 0.12 syntax, or integrate the terraform validate -json feature in 0.12, the class Runner keeps track of which terraforms exist and what version they are, that way you can enable or disable the feature based on whether a 0.12 version has been found.

@mauve I'll try to have a look at the tmLanguage files.

I'm sorry, i'm very new to this contributing to open source thing. If I had something working, what would be the process for submitting the fix, would i do a pull request against this task, or create a separate one?

edit: just submitted a pull request, hopefuly i did it right :p

the fixes by @MattFenner regarding the syntax highlighting have been merged and released as part of 1.3.12.

@juliosueiras when do you think we can integrate a version of your language-server?

Anyone has been able to disable the indexing? The following user settings.json doesn't work for me:

{
    "terraform.indexing": {
        "enabled": false
    }
}

Any update on this?

@Wenzil @mauve The indexing setting isn't taking for me either. Looking at the code it gets passed through an interpolation thingy first, maybe a bug there.

Not being a typescript developer I was able to find the relevant lines in extension.ts and just comment them out, I'll try to build it but need to get docker on this machine.

If I can do that, then at the least I can set up a tasks.json problem matcher to use terraform -validate, and if I can rig it up to a filewatcher then it accomplishes the same goal for now (at least in term of syntax validation)

I found a way to disable indexing. Added this to my settings.json:

{
  "terraform.indexing": {
    "enabled": false,
    "liveIndexing": false,
    "exclude": ["**/*"]
  },
}

Then restart VSCode. In my experience, the line "exclude": ["**/*"] and restarting VSCode are required.

Now I have syntax highlighting without the false positive syntax errors.

Thanks, I'll give it a shot!

It worked for me @btorresgil. Thanks!

I understood that the TF 0.12 support is not done yet, but right now the syntax highlighting marks the usage of variables as error: "Unknown token: 5:17 IDENT var.namespace".

e.g.

resource "kubernetes_deployment" "distributor" {
  metadata {
    name      = "cortex-distributor"
    namespace = var.namespace <-- error
  }

Is this just me? (I am using version 1.3.12)

@weeco not just you, i have the same issue and I'm on the latest version here.

Presently things like this throw the same error you're seeing.

variable "remote_state_bucket" {
  type        = map
  description = "Remote State Bucket to query for infrastructure configuration based on env"
}

@weeco @bostrowski13 we do not support TF 0.12 yet, to get rid of these errors ensure you have the following config:

{
  "terraform.indexing": {
    "enabled": false,
    "liveIndexing": false,
    "exclude": ["**/*"]
  },
}

So does this disable TF linting and syntax for just the sceneario above or does it totally disable it?

most features of the plugin (e.g. CodeLense references, the treeview, goto definition and so on) require the successful parsing of the template files, this parsing only supports HCL1/TF <0.12; this config disables all those features

@mauve This config doesn't work for .tf files under .terraform/ directories (when modules are sourced via git)

@mauve or @juliosueiras - Looks like the active conversation on this issue has stalled a little bit.

Is the current plan still to try and switch over to terraform-lsp for (most of?) the implementation of this plugin? If so, is there a way some of us can help with this process?

I am mostly focus on making it as full feature as possible for the
lsp(focusing on backends and provisioner right now)

On Mon, Jul 15, 2019 at 1:42 PM Chuck Nelson notifications@github.com
wrote:

@mauve https://github.com/mauve or @juliosueiras
https://github.com/juliosueiras - Looks like the active conversation on
this issue has stalled a little bit.

Is the current plan still to try and switch over to terraform-lsp
https://github.com/juliosueiras/terraform-lsp for (most of?) the
implementation of this plugin? If so, is there is a way some of us can help
with this process at all?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mauve/vscode-terraform/issues/157?email_source=notifications&email_token=AA4CQLRMUPJMN7DWKHNHQODP7SZHHA5CNFSM4G3B4TNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ6N4SY#issuecomment-511499851,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4CQLRQ27PENI7GCEPSK4LP7SZHHANCNFSM4G3B4TNA
.

@juliosueiras

I am mostly focus on making it as full feature as possible for the lsp (focusing on backends and provisioner right now)

Sounds good - is there any value in helping evolve vscode-languageclient-terraform as you work on the main LSP? I'm not entirely sure of the flow/implementation plan, so maybe that's wasted effort for implementing the LSP in this Terraform extension...

That is correct, the vscode extension that I did is more to show how to
integrate terraform-lsp into vscode, my hope is for this
plugin(vscode-terraform) to use terraform-lsp, while I focus on the lsp
itself

On Mon, Jul 15, 2019 at 2:57 PM Chuck Nelson notifications@github.com
wrote:

@juliosueiras https://github.com/juliosueiras

I am mostly focus on making it as full feature as possible for the lsp
(focusing on backends and provisioner right now)

Sounds good - is there any value in helping evolve
vscode-languageclient-terraform
https://github.com/juliosueiras/vscode-languageclient-terraform as you
work on the main LSP? I'm not entirely sure of the flow/implementation
plan, so maybe that's wasted effort for implementing the LSP in this
Terraform extension...


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mauve/vscode-terraform/issues/157?email_source=notifications&email_token=AA4CQLVGCGMWV5QRWM6BKUDP7TCCVA5CNFSM4G3B4TNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ6UQKA#issuecomment-511526952,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4CQLWEBNQF4WS2BKXFZZDP7TCCVANCNFSM4G3B4TNA
.

Might be game to pick this up and integrate the language server. Going to fiddle tonight and see how far I can get to get a gauge on whether I'm likely to be able to see it through to a PR.

My proposal.

  1. On startup prompt to install missing tool (aka lsp server from @juliosueiras)
  2. Integrate the language server into the extension and remove existing language support. https://github.com/juliosueiras/terraform-lsp

Anyone actively working on this? Does this plan sound bad?

Anything that will make this extension vaguely work for me again

I'd be willing to "pass the hat" and bounty this one to be fixed.

Got something I'm pretty happy with together here: https://github.com/mauve/vscode-terraform/pull/200

Write up has some asks for help, if you can pick any of them up or help out please do.

Fair warning the language server is still a WIP so while this PR adds support for it .. it won't be a magic fix for everything.

Am I correct in saying there is support that can be added to vscode to offer tf0.12 support even if it's not 100% complete? And if so, could someone please give me a dummy's guide on how to add the extension into vscode as I have red lines everywhere at the moment.

@ccsalway Looks like you could build @lawrencegripper's PR and sideload the extension, but it sounds like they're working through bugs.

@ccsalway you're probably better off disabling the broken functionality using the directions in this comment until the community is ready for us to test the LSP

to provide a small good update on my side(lsp) =) , so apparently for provisioners, terraform team have the same style as provider(being gRPC communication) but bundle them as part of the terraform binary, but =) with the command terraform internal-plugin <pluginType> <pluginName> , so if someone want to communicate to chef provisioner, they will call terraform internal-plugin provisioner chef, essentially, this will allow schema grabbing with terraform binary for built-in provisioners, and use the same approach for providers binary in the lsp for external provisioners(ex. ansible provisioner), so working right now providing error checking and autocompletion for provisioners, once that is done, the only main component that is still left are stuff like autocompletion for composite interpolation

should able to push update today/tomorrow for @lawrencegripper

Screenshot_2019-07-21_00-25-59

Autocompletion for Provisioner via gRPC working =) (the above is with chef provisioner), only thing left for provisioner is error checking

Awesome @juliosueiras look forward to release :)

yes I am also looking forward to a release, we should also consider automatically building and running the tests on azure devops, I will try and setup a pipeline here https://mauvezero.visualstudio.com/vscode-terraform/_build?definitionId=5 (unless somebody beats me to it)

Well as I’m a DevOps Engineer this is probably where I should step up. I’m happy to take this on after work today.

maybe it might make sense to create a new GitHub org where we can put both repos? that way we can build them in the same azure devops org and I can give push rights to other people? (unsure about this, I have never used them)

So I think the work to integrate the terraform language server is pretty much done, at least for the first pass, be great to get a few people to test it out.

Please note the language server is still a WIP so will have issues and stands separate to my work. The work in my PR allows users to pull down the language server and use it from vscode. It also prompts to update as things are fixed and improved. I'm interested to hear if you can use Terraform: Enable/Disable language server command and install then run the language server.

Issues with the language server once installed should not be reported on the PR or here. You can find info on existing bugs and ongoing work on the language server here.

How do I install? Go here: https://github.com/mauve/vscode-terraform/pull/200 (link to visx install at the bottom).

It also prompts to update as things are fixed and improved. I'm interested to hear if you can use Terraform: Enable/Disable language server command and install then run the language server.

This part worked for me.

@lawrencegripper will start on several bug fixes(like references) and will try to tackle the biggest issue, composite interpolation

2 extra note

1) will need to add prep for the new for_each on resource(will be in terraform 0.12.6)

2) in meanwhile doing the terraform-lsp, will be doing conversion tools(to terraform) from deployment manager, cloud formation, and azure arm, will start on deployment manager first

@juliosueiras this all sounds awesome. Is there anything anyone can do to help to speed this along?

I assume this is a prerequisite to fix this bug:

resource "azurerm_virtual_machine" "slave" {
    count                               = "${local.num_slaves}"
    network_interface_ids               = ["${azurerm_network_interface.network-interface[count.index + local.num_masters].id}"]
    ...

results in

{
    "resource": "/c:/Projects/terraform/ClubSpark.Docker/main.tf",
    "owner": "terraform-errors",
    "severity": 8,
    "message": "expected \"}\" but found \".\"",
    "startLineNumber": 174,
    "startColumn": 44,
    "endLineNumber": 174,
    "endColumn": 128
}

With a fresh install of 1.4.0 and language server 0.0.5 the below snippet:

resource "aws_iam_role" "testrole" {
  name = "testrole"
  assume_role_policy = data.aws_iam_policy_document.json
}

resource "aws_iam_role_policy_attachment" "policyattach" {
  role = aws_iam_role.testrole
  policy_arn = ""
}

Results in the following error:

There is no variable named \"aws_iam_role\".

Not sure if this should go here or on the language server repo.

I believe, as per https://github.com/mauve/vscode-terraform/pull/200 and the release of 1.4.0, this ticket can be closed, right?

@jlundy2's issue may either belong in the language server repo or a new ticket?

@mauve

The language server (v0.0.5) is extremely unstable it pretty much makes this extension unusable at the moment

@rpstreef two things

1) will be pushing a 0.0.6 in these few days which will address a few issues and should make it more stable, depend if my fever is gone

2) and is also that’s why people can update and choose version of the terraform-lsp to download

I do agree that as it stands this is basically unusable. I initially thought it was the fact I'm using a Remote Dev Container but even running locally things seem to go backwards when enabling the language server.

@juliosueiras Take care of your personal health first.

Also you can go to the terraform-lsp repo to report any issue with it

In version 1.4.0 with lsp server the following errors continue to occur:

  • Unknown token: 4:12 IDENT upper
    -- upper("SG-${var.product}-${var.environment}-site")
  • Unknown token: 6:13 IDENT string
    -- type = string
  • Unknown token: 3:33 IDENT var.ami
    -- image_id = var.ami

Is your terraform binary 0.12+?

On Tue, Aug 27, 2019 at 8:35 AM Willian Itiho Amano <
[email protected]> wrote:

In version 1.4.0 with lsp server the following errors continue to occur:

  • Unknown token: 4:12 IDENT upper
    -- upper("SG-${var.product}-${var.environment}-site")
  • Unknown token: 6:13 IDENT string
    -- type = string
  • Unknown token: 3:33 IDENT var.ami
    -- image_id = var.ami


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mauve/vscode-terraform/issues/157?email_source=notifications&email_token=AA4CQLVBLWXUPLTE762EATDQGUNRDA5CNFSM4G3B4TNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HSI6Q#issuecomment-525280378,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4CQLVPQQYS6G7KYO7KK3TQGUNRDANCNFSM4G3B4TNA
.

terraform --version
Terraform v0.12.4

  • provider.aws v2.23.0
  • provider.template v2.1.2

Is your terraform binary 0.12+?

On Tue, Aug 27, 2019 at 8:35 AM Willian Itiho Amano < @.*> wrote: In version 1.4.0 with lsp server the following errors continue to occur: - Unknown token: 4:12 IDENT upper -- upper("SG-${var.product}-${var.environment}-site") - Unknown token: 6:13 IDENT string -- type = string - Unknown token: 3:33 IDENT var.ami -- image_id = var.ami — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#157?email_source=notifications&email_token=AA4CQLVBLWXUPLTE762EATDQGUNRDA5CNFSM4G3B4TNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HSI6Q#issuecomment-525280378>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4CQLVPQQYS6G7KYO7KK3TQGUNRDANCNFSM4G3B4TNA .

@Itiho Kinda silly question, but did you run "Terraform: Enable/Disable Language server" after updating VSCode plugin?

@Itiho Kinda silly question, but did you run "Terraform: Enable/Disable Language server" after updating VSCode plugin?

Yes. I install terraform-lsp v.0.0.5

FYI: the terraform-lsp repo does have a gitter in case there is question

The language server (v0.0.5) is extremely unstable it pretty much makes this extension unusable at the moment

@rpstreef I believe it's unintended to be but this comment isn't encouraging or helpful. This is already called out in the PR as Experimental.

As an OSS contributor who's given my free time to help build stuff to help others and then felt down after comments... I know how easy it can be to demotivate people unintentionally. My suggestion would be one of the following is better fit for future:

"I've seen this be unstable, [here are some logs to help debug the issue / look forward to a future build thanks for work so far Julio / how can I help]"

@juliosueiras is giving time freely to make the LSP and that deserves respect, encouragement and or help.

Been lurking this thread for a while, sorry to clog it with unhelpful encouragement but I really appreciate the work you guys are doing. This functionality has incredible amounts of utility to me, and I wanted to echo @lawrencegripper's sentiment, great work!

Thank you @juliosueiras and others!

btw @lawrencegripper on wed/thursday, I might need to fork terraform repo and add a few changes to the schema, since right now, Nesting blocks loses their optional/required info when using gRPC request, so I might try to fix that

I also want to praise you all who's been working on it. This is the most popular vs-code extension for terraform (imo) and all the effort you put into it is incredibly valuable for hundreds and thousands of engineers!

I'm willing to start a reward bounty.
Maybe if we can pool together enough someone will spend a week grinding it out?!

This is out of my league, but I got a couple bucks for a bounty.

Keep up the good work!

I have opened a bounty here:
https://www.bountysource.com/issues/70767330-feat-terraform-0-12-support-was-hcl2-support

Dropped in a bit of seed money to get it going. Let's get this solved!!

Shut up and take my money

@emmm-dee just a note, if the bounty is solved by me then it will be given to @mauve or @lawrencegripper , and there won't be bounties on terraform-lsp repo(since I generally don't like involving my repos with any money/bounty situation), will use the github projects feature for indicating which bug/feature is currently working on though

I can wire you part of my share so that we get equal amounts.

Sent from my iPhone

On 28 Aug 2019, at 01:47, Julio Sueiras notifications@github.com wrote:

@emmm-dee just a note, if the bounty is solved by me then it will be given to @mauve or @lawrencegripper , and there won't be bounties on terraform-lsp repo(since I generally don't like involving my repos with any money/bounty situation), will use the github projects feature for indicating which bug/feature is currently working on though


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I've added $15 to the bounty. Thanks for the work guys. ❤️
PS: make sure you cash that money out once it's solved, the fees for stagnant wallets is atrocious.

I've chipped in. A very worthwhile bounty, and thanks for all the work done so far!

@lawrencegripper Status Update regarding Validation and few other stuff:

So currently I will need to go through terraform repo and create a walk context(terraform.NewContext) since that contain a lot of info that can be use in the lsp, but more importantly, I tried temporarily using terraform validate -json but decide to continue with walk context.

This is due to terraform validate -json doesn't allow on the fly error checking, so it will require the user to save to get error check(so negating the purpose of async error check)

Once the context is finished(hopefully within 2-3 days), I will move on to looking to state tree for terraform(probably will look into show command for insight), this will allow hover preview for value

Is there anyone currently working on this and open to contributing toward that work? I'm not interested in the bounty but I'd like to contribute toward something anyone has started on this.

@nufyoot ..... I am working on it

I'm not sure if this will be helpful here or you'd like this is a new issue, but I'm using version 1.4.0 with TF 0.12.7 in VSCode 1.37.1 (User).

After opening and hovering the mouse over a .tf file in VSCode, the language server seems to blow up:

2019/08/30 12:31:26 Server started
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x58 pc=0x8d6493]

goroutine 54 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc00042b0e0, 0xc000006770, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0x123
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(0xc00042b0e0, 0xc000006770, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160 +0x66
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00042b0e0, 0x11bd3c0, 0xc0003ef020, 0x11be080, 0x1948390, 0xe99ee0, 0xc0000ac2c0, 0xff0b5e, 0x6, 0xc00042c6e0, ...)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xa7
main.TextDocumentHover(0x11bcd80, 0xc000335bf0, 0xc00002c0e0, 0x69, 0x3b, 0x38, 0x0, 0x0, 0x0, 0x0, ...)
    /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:549 +0x299
reflect.Value.call(0xea4ae0, 0x1037d68, 0x13, 0xfee7d0, 0x4, 0xc000335da0, 0x2, 0x2, 0xc000478000, 0xc0004c5dc8, ...)
    /home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xea4ae0, 0x1037d68, 0x13, 0xc000335da0, 0x2, 0x2, 0xe49040, 0xc000335da0, 0x1)
    /home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc000335da0, 0x2, 0x2, 0x1, 0xc000496280, 0x1)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11bcd80, 0xc000335bf0, 0xc0004060c0, 0xc000406130, 0xc00048dee8, 0x10, 0xc00048dee0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc000408680, 0x11bcd80, 0xc000335bf0, 0xc0004060c0, 0x0, 0x0, 0x11bcd80, 0xc000335bf0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc000486000, 0x11bccc0, 0xc000049d40, 0x11b2120, 0xc000408680, 0xc0004060c0, 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(0xc000037120, 0xc000486000, 0xc00040c240)
    /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
[Info  - 12:32:17] Connection to server got closed. Server will restart.
[Error - 12:32:17] Request textDocument/hover failed.
Error: Connection got disposed.
    at Object.dispose (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:876:25)
    at Object.dispose (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:71:35)
    at LanguageClient.handleConnectionClosed (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2153:42)
    at LanguageClient.handleConnectionClosed (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\main.js:151:15)
    at closeHandler (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2140:18)
    at CallbackList.invoke (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
    at Emitter.fire (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
    at closeHandler (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:226:26)
    at CallbackList.invoke (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
    at Emitter.fire (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
    at StreamMessageReader.fireClose (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:111:27)
    at Socket.listen.readable.on (C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:151:46)
    at Socket.emit (events.js:187:15)
    at Pipe.Socket._destroy._handle.close (net.js:606:12)
    at Pipe.asyncWrap (C:\Users\someuser\.vscode\extensions\ms-azuretools.vscode-azureterraform-0.2.4\node_modules\async-listener\glue.js:188:31)
2019/08/30 12:32:17 Server started

It seems to restart it several times before it totally gives up.

As I write in the .tf file, in VSCode's OUTPUT, I get:

2019/08/30 12:37:38 [DEBUG] plugin dirs: []string{".", "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin", "terraform.d\\plugins\\windows_amd64", "C:\\Users\\SOMEUS~1\\AppData\\Local\\Temp\\1\\.terraform\\plugins\\windows_amd64", "C:\\Users\\someuser\\.terraform.d\\plugins", "C:\\Users\\someuser\\.terraform.d\\plugins\\windows_amd64", "C:\\Users\\someuser\\Source\\Repo\\Company1\\HelloWorldGo\\bin"}
2019/08/30 12:37:38 [DEBUG] checking for provider in "."
2019/08/30 12:37:38 [DEBUG] checking for provider in "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-alicloud_v1.55.1_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-aws_v2.25.0_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4.exe"
2019/08/30 12:37:38 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4.exe"
2019/08/30 12:37:38 (string) (len=23) "With Error or No Config"

2019/08/30 12:37:38 (hcl.Diagnostics) no diagnostics

2019-08-30T12:37:38.751+0100 [INFO]  plugin: configuring client automatic mTLS
2019-08-30T12:37:38.802+0100 [DEBUG] plugin: starting plugin: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe args=[c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe]
2019-08-30T12:37:38.818+0100 [DEBUG] plugin: plugin started: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe pid=15572
2019-08-30T12:37:38.818+0100 [DEBUG] plugin: waiting for RPC address: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe
2019-08-30T12:37:39.151+0100 [INFO]  plugin.terraform-provider-azurerm_v1.33.1_x4.exe: configuring server automatic mTLS: timestamp=2019-08-30T12:37:39.143+0100
2019-08-30T12:37:39.182+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.33.1_x4.exe: plugin address: network=tcp address=127.0.0.1:10000 timestamp=2019-08-30T12:37:39.182+0100
2019-08-30T12:37:39.182+0100 [DEBUG] plugin: using plugin: version=5
2019/08/30 12:37:39 [TRACE] GRPCProvider: GetSchema
2019-08-30T12:37:39.306+0100 [DEBUG] plugin: plugin process exited: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe pid=15572
2019-08-30T12:37:39.306+0100 [DEBUG] plugin: plugin exited
2019/08/30 12:37:39 [DEBUG] plugin dirs: []string{".", "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin", "terraform.d\\plugins\\windows_amd64", "C:\\Users\\SOMEUS~1\\AppData\\Local\\Temp\\1\\.terraform\\plugins\\windows_amd64", "C:\\Users\\someuser\\.terraform.d\\plugins", "C:\\Users\\someuser\\.terraform.d\\plugins\\windows_amd64", "C:\\Users\\someuser\\Source\\Repo\\Company1\\HelloWorldGo\\bin"}
2019/08/30 12:37:39 [DEBUG] checking for provider in "."
2019/08/30 12:37:39 [DEBUG] checking for provider in "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-alicloud_v1.55.1_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-aws_v2.25.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4.exe"
2019/08/30 12:37:39 (*errors.errorString)(0xc0002ca540)(Failed to find plugin: azuread. Plugin binary was not found in any of the following directories: [., c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin, terraform.d\plugins\windows_amd64, C:\Users\SOMEUS~1\AppData\Local\Temp\1\.terraform\plugins\windows_amd64, C:\Users\someuser\.terraform.d\plugins, C:\Users\someuser\.terraform.d\plugins\windows_amd64, C:\Users\someuser\Source\Repo\Company1\HelloWorldGo\bin])

2019/08/30 12:37:39 [DEBUG] plugin dirs: []string{".", "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin", "terraform.d\\plugins\\windows_amd64", "C:\\Users\\SOMEUS~1\\AppData\\Local\\Temp\\1\\.terraform\\plugins\\windows_amd64", "C:\\Users\\someuser\\.terraform.d\\plugins", "C:\\Users\\someuser\\.terraform.d\\plugins\\windows_amd64", "C:\\Users\\someuser\\Source\\Repo\\Company1\\HelloWorldGo\\bin"}
2019/08/30 12:37:39 [DEBUG] checking for provider in "."
2019/08/30 12:37:39 [DEBUG] checking for provider in "c:\\Users\\someuser\\.vscode\\extensions\\mauve.terraform-1.4.0\\lspbin"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-alicloud_v1.55.1_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-aws_v2.25.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4.exe"
2019/08/30 12:37:39 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4.exe"
2019-08-30T12:37:39.324+0100 [INFO]  plugin: configuring client automatic mTLS
2019-08-30T12:37:39.349+0100 [DEBUG] plugin: starting plugin: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe args=[c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe]
2019-08-30T12:37:39.361+0100 [DEBUG] plugin: plugin started: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe pid=17436
2019-08-30T12:37:39.361+0100 [DEBUG] plugin: waiting for RPC address: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe
2019-08-30T12:37:39.700+0100 [INFO]  plugin.terraform-provider-azurerm_v1.33.1_x4.exe: configuring server automatic mTLS: timestamp=2019-08-30T12:37:39.694+0100
2019-08-30T12:37:39.730+0100 [DEBUG] plugin: using plugin: version=5
2019-08-30T12:37:39.730+0100 [DEBUG] plugin.terraform-provider-azurerm_v1.33.1_x4.exe: plugin address: address=127.0.0.1:10000 network=tcp timestamp=2019-08-30T12:37:39.730+0100
2019/08/30 12:37:39 [TRACE] GRPCProvider: GetSchema
2019-08-30T12:37:39.825+0100 [DEBUG] plugin: plugin process exited: path=c:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin\terraform-provider-azurerm_v1.33.1_x4.exe pid=17436
2019-08-30T12:37:39.825+0100 [DEBUG] plugin: plugin exited

I don't know if the two outputs are even related, but it seems to be looking for providers, in this case azuread. I don't know how the extension uses these providers, but I do notice in C:\Users\someuser\.vscode\extensions\mauve.terraform-1.4.0\lspbin are providers, some of which I never use, so I'd guess this list is manually specified (probably by providers.tf). I'd suggest this list should be dynamic, based on the providers actually being referenced in the .tf code, particularly the version. In the case of AzureRM, it's downloaded the latest, but we aren't using the latest. I guess this will cause a delay as the list will have to be built the first time they're referenced.

After manually adding the missing azuread provider, the language server hasn't crashed - yet.


In the old version, when I started typing key words like module, variable etc, intellisense would provide a suggestion (which it does), however, selecting the suggestion, it doesn't create the scaffolding any more. For example:
image
Typing v > tab would give:

variable "name" {
}

or typing m > tab would give:

module "name" {
  source = ""
}

Suggestion: I believe I have several language servers for things like Puppet. If they are different, it might be an idea to rename Language Server to Terraform Language Server.
image

Thanks a lot for all the great work on integrating with Terraform 0.12. I tried it out I am getting a crash with VSCode saying that the lanugage server crashed 5 times in 3 mins and won't be restarted. I don't know if the error is similar to the one describe above and if I should open a new issue for the same

VSCode version: 1.37.1
OS: Darwin x64 18.2.0
Terraform: v0.12.7

  1. Installed the plugin.

  2. Enabled language server support

2019/09/02 16:54:59 Server started
  1. Opened a few terraform files and started getting the following messages:
2019/09/02 16:54:59 [DEBUG] plugin dirs: []string{".", "/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin", "terraform.d/plugins/darwin_amd64", "/Users/someuser/git.autodesk/cloudinfra-terraform-modules/tf_0.12_aws_elasticache_redis/cluster_mode_disabled/.terraform/plugins/darwin_amd64", "/Users/someuser/.terraform.d/plugins", "/Users/someuser/.terraform.d/plugins/darwin_amd64", "/Users/someuser/go/packages/bin"}
2019/09/02 16:54:59 [DEBUG] checking for provider in "."
2019/09/02 16:54:59 [DEBUG] checking for provider in "/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-alicloud_v1.55.2_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-archive_v1.2.2_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-aws_v2.26.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-azurerm_v1.33.1_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-external_v1.2.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-helm_v0.10.2_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-kubernetes_v1.9.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-null_v2.1.2_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-random_v2.2.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/02 16:54:59 [DEBUG] checking for provider in "/Users/someuser/git.autodesk/cloudinfra-terraform-modules/tf_0.12_aws_elasticache_redis/cluster_mode_disabled/.terraform/plugins/darwin_amd64"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-aws_v2.26.0_x4"
2019/09/02 16:54:59 [DEBUG] found provider "terraform-provider-template_v2.1.2_x4"
2019/09/02 16:54:59 [DEBUG] checking for provider in "/Users/someuser/go/packages/bin"
2019-09-02T16:54:59.877+0800 [INFO]  plugin: configuring client automatic mTLS
2019-09-02T16:54:59.906+0800 [DEBUG] plugin: starting plugin: path=/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.26.0_x4 args=[/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.26.0_x4]
2019-09-02T16:54:59.910+0800 [DEBUG] plugin: plugin started: path=/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.26.0_x4 pid=25112
2019-09-02T16:54:59.910+0800 [DEBUG] plugin: waiting for RPC address: path=/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.26.0_x4
2019-09-02T16:55:01.743+0800 [INFO]  plugin.terraform-provider-aws_v2.26.0_x4: configuring server automatic mTLS: timestamp=2019-09-02T16:55:01.743+0800
2019-09-02T16:55:01.778+0800 [DEBUG] plugin.terraform-provider-aws_v2.26.0_x4: plugin address: network=unix address=/var/folders/22/q7ncgcc54rv1gzdfrf7x09yh0000gn/T/plugin563550231 timestamp=2019-09-02T16:55:01.777+0800
2019-09-02T16:55:01.778+0800 [DEBUG] plugin: using plugin: version=5
2019/09/02 16:55:01 [TRACE] GRPCProvider: GetSchema
2019-09-02T16:55:01.893+0800 [DEBUG] plugin: plugin process exited: path=/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.26.0_x4 pid=25112
2019-09-02T16:55:01.893+0800 [DEBUG] plugin: plugin exited

This happened a few times before I got the following crash dump:


[Error - 4:57:47 PM] Request textDocument/hover failed.
Error: The received response has neither a result nor an error property.
    at handleInvalidMessage (/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/node_modules/vscode-jsonrpc/lib/main.js:517:40)
    at processMessageQueue (/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/node_modules/vscode-jsonrpc/lib/main.js:266:17)
    at Immediate.setImmediate (/Users/someuser/.vscode/extensions/mauve.terraform-1.4.0/node_modules/vscode-jsonrpc/lib/main.js:247:13)
    at runCallback (timers.js:694:18)
    at tryOnImmediate (timers.js:665:5)
    at processImmediate (timers.js:647:5)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x14d70ac]

goroutine 121 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc000471d60, 0xc0004d0200, 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(0xc000471d60, 0xc0004d0200, 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(0xc000471d60, 0x1da8e00, 0xc0004bccc0, 0x1da9ac0, 0x2542040, 0x1ad9260, 0xc00010e600, 0x1bdd169, 0x8, 0xc000466840, ...)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xa0
main.TextDocumentHover(0x1da87c0, 0xc0004df5c0, 0xc000042180, 0x7b, 0x30, 0x24, 0x0, 0x0, 0x0, 0x0, ...)
    /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:549 +0x28c
reflect.Value.call(0x1a8dcc0, 0x1c20698, 0x13, 0x1bd8646, 0x4, 0xc0004df680, 0x2, 0x2, 0xc0005a4000, 0xc0000e7dc8, ...)
    /home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:447 +0x454
reflect.Value.Call(0x1a8dcc0, 0x1c20698, 0x13, 0xc0004df680, 0x2, 0x2, 0x1a313c0, 0xc0004df680, 0x1)
    /home/travis/.gimme/versions/go1.11.12.linux.amd64/src/reflect/value.go:308 +0xa4
reflect.Value.Call-fm(0xc0004df680, 0x2, 0x2, 0x1, 0xc000305680, 0x1)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x60
github.com/creachadair/jrpc2/handler.newHandler.func7(0x1da87c0, 0xc0004df5c0, 0xc000468840, 0xc000099d70, 0xc0000646e8, 0x10, 0xc0000646e0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x22b
github.com/creachadair/jrpc2/handler.Func.Handle(0xc000305400, 0x1da87c0, 0xc0004df5c0, 0xc000468840, 0x0, 0x0, 0x1da87c0, 0xc0004df5c0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x44
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000d03c0, 0x1da8700, 0xc00007c600, 0x1d9d820, 0xc000305400, 0xc000468840, 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(0xc0004640c0, 0xc0000d03c0, 0xc00028c1b0)
    /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 - 4:57:47 PM] Connection to server got closed. Server will not be restarted.

@saurabh-hirani I am getting the same issue. It seemed like it was working fine last week.

Having the same issue as @saurabh-hirani on Debian 11 x64, Terraform V0.12.7, VSC 1.37.1, too.
I can't force the window to not auto-open - it opens anyways, no matter that i've set up everything in settings for it not to do so. Also, the scaffolding mentioned earlier is gone too.

No matter if it works now or not, thank you for your work, it's the only Terraform VSC Extension that i found, that would do what i'd be expecting - it's a shame HashiCorp didn't want to take over and support it - i can't imagine Terraforming on VSC without it now. It just hurts, and i am 150% sure i'm not the only one. Trip to IntelliJ is not an option here - i love VSC, and i love working with VSC.

I'll try to tip up the bounty a little bit - every penny counts now, i think. I'll also ask my Boss to tip it up - good work surely deserves the rewards, especially in this case - when it makes other's work much easier.

Keep up the faith, keep up with the good work, and remember - we do appreciate it, very very much. You're one of the pillars keeping the DevOps stuff at our fingertips - the modules or resources are able to be written as code, the respect and thanks we owe you for making this a trifle aren't.

The same issue @saurabh-hirani
It can apply OK without any errors, but the VS still appear --> really annoys
image
image
image

Is someone working on this? right now this module is broken for 0.12. I had to switch to intelliJ.
Would love to come back as soon as the issues are fixed.

@al73rna ... working on it, since state loading in terraform is locked to itself, so right now focus on https://github.com/juliosueiras/terraform-lsp/blob/master/Plan.md , and once this issue is out of the way, I am going to check crashing issues, and stabilization

k, v0.0.6 added asciicast

still I need to add deep type check, but I will need to balance speed and deep check, since it won't be really good to requery all the schemas at every keystroke

Nice work!

For those with a previous version running you'll see the following notification when you launch VSCode

image

Run

image

Then select 0.0.6

image

Profit

image

image

Thanks @juliosueiras !

I got a couple of errors but the end says the Server started ...

... and it's no longer barking about var.variable_name

2019/09/18 07:04:08 Server started
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x60 pc=0x8d5ac3]

goroutine 41 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc00042f6d0, 0xc0004203e8, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0x123
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(0xc00042f6d0, 0xc0004203e8, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160 +0x66
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00042f6d0, 0x11ca520, 0xc0003bd8c0, 0x11cb1a0, 0x195a468, 0xef91a0, 0xc0004ba300, 0xffd82e, 0x8, 0xc000430c60, ...)
    /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xa7
main.TextDocumentHover(0x11c9ea0, 0xc0002cae70, 0xc0004220a0, 0x41, 0x21, 0x1e, 0x0, 0x0, 0x0, 0x0, ...)
    /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:549 +0x299
reflect.Value.call(0xeae4e0, 0x1042668, 0x13, 0xff8cd3, 0x4, 0xc0002caf30, 0x2, 0x2, 0xc000064700, 0xc00008ddc8, ...)
    /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xeae4e0, 0x1042668, 0x13, 0xc0002caf30, 0x2, 0x2, 0xe52400, 0xc0002caf30, 0x1)
    /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc0002caf30, 0x2, 0x2, 0x1, 0xc0002c91a0, 0x1)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c9ea0, 0xc0002cae70, 0xc0002c62c0, 0xc0001e9270, 0xc0004e1ee8, 0x10, 0xc0004e1ee0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc00041a580, 0x11c9ea0, 0xc0002cae70, 0xc0002c62c0, 0x0, 0x0, 0x11c9ea0, 0xc0002cae70)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc000490000, 0x11c9de0, 0xc000418080, 0x11bf1c0, 0xc00041a580, 0xc0002c62c0, 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(0xc0004240c0, 0xc000490000, 0xc00045c090)
    /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
[Info  - 7:04:26 AM] Connection to server got closed. Server will restart.
[Error - 7:04:26 AM] Request textDocument/hover failed.
Error: Connection got disposed.
    at Object.dispose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:876:25)
    at Object.dispose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:71:35)
    at LanguageClient.handleConnectionClosed (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2153:42)
    at LanguageClient.handleConnectionClosed (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\main.js:151:15)
    at closeHandler (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2140:18)
    at CallbackList.invoke (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
    at Emitter.fire (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
    at closeHandler (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:226:26)
    at CallbackList.invoke (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
    at Emitter.fire (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
    at StreamMessageReader.fireClose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:111:27)
    at Socket.listen.readable.on (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:151:46)
    at Socket.emit (events.js:187:15)
    at Pipe.Socket._destroy._handle.close (net.js:606:12)
2019/09/18 07:04:27 Server started

Hello, how to disable this Language server? It shows a lot of errors in the code (fake errors).

Thanks @juliosueiras !

I got a couple of errors but the end says the Server started ...

... and it's no longer barking about var.variable_name

2019/09/18 07:04:08 Server started
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x60 pc=0x8d5ac3]

goroutine 41 [running]:
github.com/hashicorp/terraform/lang.(*Scope).evalContext(0xc00042f6d0, 0xc0004203e8, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0)
  /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:184 +0x123
github.com/hashicorp/terraform/lang.(*Scope).EvalContext(0xc00042f6d0, 0xc0004203e8, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0)
  /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:160 +0x66
github.com/hashicorp/terraform/lang.(*Scope).EvalExpr(0xc00042f6d0, 0x11ca520, 0xc0003bd8c0, 0x11cb1a0, 0x195a468, 0xef91a0, 0xc0004ba300, 0xffd82e, 0x8, 0xc000430c60, ...)
  /home/travis/gopath/pkg/mod/github.com/hashicorp/[email protected]/lang/eval.go:87 +0xa7
main.TextDocumentHover(0x11c9ea0, 0xc0002cae70, 0xc0004220a0, 0x41, 0x21, 0x1e, 0x0, 0x0, 0x0, 0x0, ...)
  /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:549 +0x299
reflect.Value.call(0xeae4e0, 0x1042668, 0x13, 0xff8cd3, 0x4, 0xc0002caf30, 0x2, 0x2, 0xc000064700, 0xc00008ddc8, ...)
  /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xeae4e0, 0x1042668, 0x13, 0xc0002caf30, 0x2, 0x2, 0xe52400, 0xc0002caf30, 0x1)
  /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc0002caf30, 0x2, 0x2, 0x1, 0xc0002c91a0, 0x1)
  /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c9ea0, 0xc0002cae70, 0xc0002c62c0, 0xc0001e9270, 0xc0004e1ee8, 0x10, 0xc0004e1ee0)
  /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc00041a580, 0x11c9ea0, 0xc0002cae70, 0xc0002c62c0, 0x0, 0x0, 0x11c9ea0, 0xc0002cae70)
  /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc000490000, 0x11c9de0, 0xc000418080, 0x11bf1c0, 0xc00041a580, 0xc0002c62c0, 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(0xc0004240c0, 0xc000490000, 0xc00045c090)
  /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
[Info  - 7:04:26 AM] Connection to server got closed. Server will restart.
[Error - 7:04:26 AM] Request textDocument/hover failed.
Error: Connection got disposed.
  at Object.dispose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:876:25)
  at Object.dispose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:71:35)
  at LanguageClient.handleConnectionClosed (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2153:42)
  at LanguageClient.handleConnectionClosed (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\main.js:151:15)
  at closeHandler (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-languageclient\lib\client.js:2140:18)
  at CallbackList.invoke (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
  at Emitter.fire (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
  at closeHandler (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\main.js:226:26)
  at CallbackList.invoke (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:62:39)
  at Emitter.fire (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\events.js:120:36)
  at StreamMessageReader.fireClose (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:111:27)
  at Socket.listen.readable.on (c:\Users\jlarrow\.vscode\extensions\mauve.terraform-1.4.0\node_modules\vscode-jsonrpc\lib\messageReader.js:151:46)
  at Socket.emit (events.js:187:15)
  at Pipe.Socket._destroy._handle.close (net.js:606:12)
2019/09/18 07:04:27 Server started

I get the same error

@lawrencegripper @jlarrow =) k, I pushed 0.0.7 , I completely forgot that vscode uses mouse first, and since in the beginning I added hover function for testing, and forget to take it out, and due to me only using vim, so I never noticed the error, so now it should be a lot more stable

only seeing 0.6 out

is going through travis right now

k, 0.0.7 is out, can someone try it out?

@juliosueiras

2019/09/18 10:57:36 Server started
[Error - 10:58:00 AM] Request textDocument/hover failed.
  Message: no such method "textDocument/hover"
  Code: -32601 
[Error - 10:58:05 AM] Request textDocument/hover failed.
  Message: no such method "textDocument/hover"
  Code: -32601 
[Error - 10:58:06 AM] Request textDocument/hover failed.
  Message: no such method "textDocument/hover"
  Code: -32601 

Same as @smiller171 here
However, at least the language server is starting and isn't turning my entire explorer red.

@juliosueiras I think you need to set this one to false so that VSCode doesn't think the LSP provides hover.

https://github.com/juliosueiras/terraform-lsp/blob/0824e552f63ef5faa6d0b46f26f97465898e92d3/main.go#L61

@juliosueiras Thanks for working on this!

Getting the same hover error as others, and also it doesn't think count is a proper variable for some reason. A resource like so:

resource "aws_iam_role_policy_attachment" "lambda_basic" {
  count      = length(local.lambda_role_arns)
  role       = aws_iam_role.lambda.name
  policy_arn = local.lambda_role_arns[count.index]
}

Is returning an error like this:

{
    "resource": "/Users/jlindsey/projects/porter/infra/iam.tf",
    "owner": "_generated_diagnostic_collection_name_#0",
    "severity": 8,
    "message": "There is no variable named \"count\".",
    "source": "Terraform Schema",
    "startLineNumber": 30,
    "startColumn": 39,
    "endLineNumber": 30,
    "endColumn": 44
}

@lawrencegripper thanks for catching that =)

k, repushed it

NOTE: is repushed to 0.0.7, so please redownload 0.0.7 version

I would advise to always push new versions. Re-pushing existing versions can lead to a lot of trouble.

@eedwards-sk k, pushed to 0.0.8

Looks like the build failed @juliosueiras

k, is up now

I'm receiving the same error as @Itiho and @jlarrow using 0.0.8 on Windows. Error occurs after every keystroke and so VSCode kills the language server after I press 5 keys (5 uncaught exceptions terminates the server in VSCode).

2019/09/18 14:48:52 Server started
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x60 pc=0xd83592]

goroutine 28 [running]:
github.com/juliosueiras/terraform-lsp/tfstructs.GetDiagnostics(0xc000472040, 0x33, 0xc000472240, 0x38, 0x0, 0x0, 0x1)
    /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/tfstructs/diags.go:51 +0x642
main.TextDocumentDidChange(0x11c9ea0, 0xc000516630, 0xc0004721c0, 0x3f, 0x13, 0xc0000ee280, 0x1, 0x4, 0x0, 0x0)
    /home/travis/gopath/src/github.com/juliosueiras/terraform-lsp/main.go:455 +0x155
reflect.Value.call(0xe8e6e0, 0x1042650, 0x13, 0xff8cd3, 0x4, 0xc0005167e0, 0x2, 0x2, 0x193f280, 0xc00046ddc8, ...)
    /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:447 +0x45b
reflect.Value.Call(0xe8e6e0, 0x1042650, 0x13, 0xc0005167e0, 0x2, 0x2, 0xe52400, 0xc0005167e0, 0x1)
    /home/travis/.gimme/versions/go1.11.13.linux.amd64/src/reflect/value.go:308 +0xab
reflect.Value.Call-fm(0xc0005167e0, 0x2, 0x2, 0x1, 0xc00020bd20, 0x1)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:211 +0x67
github.com/creachadair/jrpc2/handler.newHandler.func7(0x11c9ea0, 0xc000516630, 0xc000222680, 0xc000222030, 0xc00000fee8, 0x10, 0xc00000fee0)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:222 +0x232
github.com/creachadair/jrpc2/handler.Func.Handle(0xc0000044c0, 0x11c9ea0, 0xc000516630, 0xc000222680, 0x0, 0x0, 0x11c9ea0, 0xc000516630)
    /home/travis/gopath/pkg/mod/github.com/creachadair/[email protected]/handler/handler.go:23 +0x4b
github.com/creachadair/jrpc2.(*Server).invoke(0xc00050c000, 0x11c9e20, 0xc000082080, 0x11bf1c0, 0xc0000044c0, 0xc000222680, 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(0xc000514070, 0xc00050c000, 0xc0002ec120)
    /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
[Info  - 2:48:56 PM] Connection to server got closed. Server will restart.

@Liam3851 just pushed 0.0.9 to fix that issue

The language server doesn't recognize the terraform_remote_state data resource yet.

Screen Shot 2019-09-18 at 2 16 18 PM

@MattFenner yeah, sorry about that, will add it in a bit, the issue that terraform remote state is internal provider , rather than external provider(similar to provisioner) so I will add in 10-15 minute

@Liam3851 just pushed 0.0.9 to fix that issue

@juliosueiras Just got 0.0.9, can confirm fixed. Thanks!!

@MattFenner ... it look like terraform remote state is a different kind of beast, so it will take me more time to do it

file needs to resolve variables before checking if the path exists, e.g.:

image

Receiving There is no variable named "count". using 0.0.9. "count" should be a valid reserved variable placeholder.
https://www.terraform.io/upgrade-guides/0-12.html#working-with-count-on-resources

Welcome to the floodgates. Just keep fixing and incrementing.

On Wed, Sep 18, 2019 at 6:06 PM Mike Lehner notifications@github.com
wrote:

Receiving There is no variable named "count". using 0.0.9. "count" should
be a valid reserved variable placeholder.

https://www.terraform.io/upgrade-guides/0-12.html#working-with-count-on-resources


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mauve/vscode-terraform/issues/157?email_source=notifications&email_token=AAPEP5ACD7WCWL5QQ5IEDELQKKX63A5CNFSM4G3B4TNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7BWRWI#issuecomment-532900057,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPEP5DGBDABYKBSKUXICXLQKKX63ANCNFSM4G3B4TNA
.

@christophla for 0.0.10 , going to be a sum changes instead, since now is more stable for general use(for vscode)

lsp 0.0.9 still crashes for me

2019/09/19 08:52:41 Server started
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

I have v0.0.6 installed.

When I run the "Terraform: Install/Update Language Server" command to update to 0.0.9, I get this error:

command 'terraform.installLanguageServer' not found

How can I update the language server?

UPDATE: okay my bad, I was just not in a terraform project so the language server wasn't detected. I switched to a terraform project and it works fine 👍

hi! just a quick question: How is the cpu usage ? I had issues with a <0.0.6 version. Is it still an issue on 0.0.9+ ?

@juliosueiras Hi! I want to start of by thanking you so much for the improvements!

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.

Can these be opened as separate issues in terraform-lsp rather than posting in this one issue please?

@rifelpet I agree, since is hard for me to keep track of the issues on this issue

I'd still like to keep this issue open so we can track overall progress -- e.g. I've been enjoying following the status updates.

Could it be locked to contributors?

@eedwards-sk I think the intent was just to avoid continued terraform-lsp bug discussion/reporting on this issue, not close it prematurely.

@joshsleeper for sure, just need to know what is the focus on this issue, since the thread is getting quite long

Apologies. I will totally submit it to the terraform-lsp repo!

@mkcgem I'm seeing the same issue but I think the linter is working. The language server restarts after every key stroke in VSCode. Also, the linter is still detecting syntax errors and similar within VSCode.

OP has moved his error over to the LSP repo: https://github.com/juliosueiras/terraform-lsp/issues/25

The last error from the Language Server outputs:

2019-09-23T13:19:42.582+1000 [DEBUG] plugin: plugin process exited: path=/Users/jonathontaylor/repos/terraform-provider-okta/terraform-provider-okta_v3.0.21 pid=20683 2019-09-23T13:19:42.582+1000 [DEBUG] plugin: plugin exited

Syntax check is shown below. Note, the for_each and var.accounts syntax works but I believe there's an existing problem with using each.key loop as shown by the highlight.

image

Is there a way to dismiss the notification about enabling LS, until this stabilizes? Currently, it's shown every time the VSCode starts up..

Hey,

sorry for asking this question, but can somebody shortly summarize what needs to be done to get the terraform-lsp up and running with vscode ?

It seems from the comments that it's stabilizing now and can be used with HCL2

Do I still need this (vscode-terraform) extension ?
Do I need to point it at the lsp ?

I've read through this gigantic thread now, but could not figure it out.

Yes you need the terraform extension. I think all you need to do then is to press F1, select Terraform: Install/Update Language Server and then select the latest version.

I noticed you can add a provider to $HOME/.vscode/extensions/mauve.terraform-1.4.0/lspbin/providers.tf and reload VS Code to get rid of "provider does not exist" and "resource does not exist" errors. I did so with the Github provider. Just wanted to share in case anyone is using a provider not included by default.

VSCode Version: 1.38.1, installing language server v0.0.9

Command 'Terraform: Install/Update Language Server' resulted in an error.

@lawrencegripper @mauve https://github.com/juliosueiras/terraform-lsp/tree/master/langserver just pushed a commit to break up the main.go to modular lsp files, so it should be much easier for me to add new features(and fix bugs) now, right now focusing some var element like path.root,module,cwd since it need to hold actual value to have correct diags, then I will see if I can start adding a caching system

I noticed you can add a provider to $HOME/.vscode/extensions/mauve.terraform-1.4.0/lspbin/providers.tf and reload VS Code to get rid of "provider does not exist" and "resource does not exist" errors. I did so with the Github provider. Just wanted to share in case anyone is using a provider not included by default.

Just to add to that, I had to download the Provider from https://releases.hashicorp.com/ and put in

$HOME\.vscode\extensions\mauve.terraform-1.4.0\lspbin\.terraform\plugins\windows_amd64

just some update, working better path support and module support, also on the side looking into LSIF for terraform

I noticed you can add a provider to $HOME/.vscode/extensions/mauve.terraform-1.4.0/lspbin/providers.tf and reload VS Code to get rid of "provider does not exist" and "resource does not exist" errors. I did so with the Github provider. Just wanted to share in case anyone is using a provider not included by default.

Just to add to that, I had to download the Provider from https://releases.hashicorp.com/ and put in

$HOME\.vscode\extensions\mauve.terraform-1.4.0\lspbin\.terraform\plugins\windows_amd64

A simpler solution:
Edit the $HOME/.vscode/extensions/mauve.terraform-1.4.0/lspbin/providers.tf to include any providers you may be missing, then

cd $HOME\.vscode\extensions\mauve.terraform-1.4.0\lspbin; terraform init

Hey @juliosueiras can I suggest forking the path, module and LSIF support into new issues and closing this one? Its getting a little noisy in this one.

Hi. Is there support of 0.12 version? I have multiple errors about 0.12 syntax and about indents like file & format

Hi. Is there support of 0.12 version? I have multiple errors about 0.12 syntax and about indents like file & format

It's a work-in-progress at this point - 0.12 support is included with a shift to a language server implementation. See PR #200 for the first iteration that was released (1.4.0 release).

Question about the indexing / language server. Is the indexing part not part of the new language server ? I seem to lose all variable / resource references and definitions.

Second that. I suspect it's just not implemented yet, but one of the best benefits of terraform plugin was (and still is for tf-11) ability to cmd+click and go to variable/local definition or to aws resources documentation. Guess go to docs won't be needed with language server autocompletion for resource's attributes, which should work for all the providers, not only aws. But for large complicated projects go to var definition is much needed feature.

Sorry for the delay, will be pushing several fixes regarding files and other issues to the lsp this week, and also fix/add indexing

Newbie here - how can I get hcl2 to work in vscode after getting this message?

For Terraform 0.12 support try enabling the experimental language server with the 'Terraform: Enable/Disable Language Server' command

@rawadrifai bring up the command panel (ctl/cmd+shift+p) and type Terraform: Install to bring up the language server installation command and Terraform: Enable to bring up the language server enable command

+1

Hey @lucas-caylent FYI, dont comment on GH issues with a +1. Use the pick your reaction button on a comment instead to give it a thumbs up.

@lawrencegripper I revamp the README on the lsp also added Todos (to indicate which item I am focusing on)

I'm running VSCode on a disconnected environment. I added terraform-lsp in my PATH but VSCode stills asks me to download it from the internet. What should I do to use my locally installed terraform-lsp binary ?

@gvcgael you can specify the binary location using VSCode settings.json. This line is the relevant code.

https://github.com/mauve/vscode-terraform/blob/acbf3bde0854a4176d69ff444c29b8fe7ad526f3/src/commands/installLanguageServer.ts#L24

Something like this should work (make sure the lsp is executable):

    "terraform.languageServer": {
        "enabled": true,
        "pathToBinary": "/path/here",
    },

Ok i did this :

    "terraform.languageServer": {
        "enabled": true,
        "pathToBinary": "D:\\bin\\terraform-lsp.exe",
    },

But it is still asking to download the server ?

Side note: this should be in a new different issue rather than on this MONSTER thread.

https://github.com/mauve/vscode-terraform/blob/acbf3bde0854a4176d69ff444c29b8fe7ad526f3/src/languageclient.ts#L70-L78

Slightly misleading but pathToBinary should be set to the folder containing the extracted lsp. If that doesn't work I'm out of ideas other than suggesting going through the code.

Can you raise a PR to add some docs to the Readme around this if that works?

I have another problem : when running disconnected from the internet, the extensions uses terraform init as-is. In disconnected mode, we have to use -get-plugins=false to avoid terraform from downloading plugins. Is it possible to customize this behaviour ?

@lawrencegripper

That setting worked for me. Is it also to configure the location of the providers? I am attempting to use this plugin through the remote containers capability of vscode and right now everytime it loads the container it wants to download the providers. I would like to be able to include those in my container image.

oi what's going on here with the downvotes :smile: Let people have fun :stuck_out_tongue_winking_eye:

Thanks here from my side for the hard work :)

Great work guys. Great plugin, thanks for everything!

I got 0.12 support working following the instructions in the Changelog and installing the language server. This resolved the vast majority of my linting errors. The only issue i have now is that it doesn't recognise the each parameter when using for_each:

image

The code works, and passes TF Validate without issue.

Just noting this.

Cheers

I have installed and enabled the language server (v0.0.9). Looks like the syntax validation works well for hcl2. The issue is that when I type e.g.
resource aws_
pop-up window appears with a list of all aws resources but when I choose one, it does not paste the code template into the editor.
Nor do I see the outline for .tf files.
Any Idea what is wrong? Thanks.

sorry about the delay(been busy with work), will update the lsp to 0.0.10 with several fixes and features added to it around next week

A quick update: need to move the update to this week due to getting sick as of right now, but a few things that I have planned (aside from fixes to existing issues)

  1. Terragrunt integration

  2. Remote state completion

  3. tfvars completion

  4. Start work for indexing and references

(repost due to accidentally posted the previous with work account)

Hi @juliosueiras @lawrencegripper Thanks for your work for Terraform 0.12 support!

I'm not sure if this is the right place to ask/tell you about this issue but I got errors on 'fine' syntaxes. For example:

variable "instance_type" {
  type        = string
  description = "AWS instance type."
}

Throws this error:
Unknown token: 6:17 IDENT string

Is this a known issue or can I do something to fix this? I'm using TF language server 0.0.9. Or should I just have a few days patience for 0.0.10? :smiley:

_Edit_: I see it also fails on root level variables. Example:

provider "aws" {
  version = "~> 2.17"
  region = var.project_region
}

Fails with the same message:
Unknown token: 17:12 IDENT var.project_region

I appreciate all of the hard work to get TF12 working. This is an awesome extension!

To add to @brnl,

It seems to only throw an error on the first variable call in each file. I have

locals {
  environment = terraform.workspace
}

provider "aws" {
  region = module.common.region
  profile = local.environment
}

and only environment = terraform.workspace is throwing the Unkown token IDENT error

@TheRealChrisThomas

It seems to only throw an error on the first variable call in each file.

My assumption is that it just gives up on the file after the first error.

_Off-topic tip: Use ```hcl to enable syntax highlighting :smile:_

quick update: I am still working on the new features , but pushed 0.0.10 for now, this one should fixed the followings:

  • the windows path pickup issue(it should now pickup the directory with .terraform)
  • did a quick redo for filesystem for the temp files, so now is using in-memory filesystem(afero), this allow the removal of garbage files generated from the lsp
  • now clients(providers) are stored in the life time of the lsp server, so it won't restart client each time when there is a keystroke.
  • introduce -debug for log level, by default there is minimal logging now

So this is more a performance update, 0.0.11 will be more toward language features and fixes

Can we use it with Terraform 0.11? As we have a bunch of projects to be migrated to 0.12, so we need to support 0.11 and 0.12 simultaneously...

attention for mac users: please reinstall 0.0.10 since now I have restrict the search path for .terraform(the per project folder) to 4 level deep, this will fix the recursive loop which cause the CPU jump to 300+ percentage, now it should be around 0.0-0.1 percentage on standby, and 0.17-0.7 when prompting for completion

Can we use it with Terraform 0.11? As we have a bunch of projects to be migrated to 0.12, so we need to support 0.11 and 0.12 simultaneously...

I do not believe so - the syntax is very different. I am moving from .11 to .12 now, you won't have the same functionality with 0.11

Is there a way to ignore the Unkown token IDENT error until 0.0.11 is released?

@dvargas92495 do you have 0.12 enable? or updated vscode-terraform to latest? since that error I am pretty sure is due to 0.11.0 terraform version of vscode-terraform encountering 0.12 terraform syntax

Yes, I have terraform 0.12 installed and have the latest version of the extension in vscode

The easiest way to have support for both 0.11 and 0.12 projects is to use per-project settings in .vscode/settings.json:

0.11

{
    "terraform.path": "terraform11",
    "terraform.indexing": {
        "enabled": true,
        "liveIndexing": true
    },
    "terraform.languageServer": {
        "enabled": false,
        "args": []
    }
}

0.12

{
    "terraform.path": "terraform12",
    "terraform.indexing": {
        "enabled": false
    },
    "terraform.languageServer": {
        "enabled": true,
        "args": []
    }
}

Personally I'm using global-config extension for quick copy of settings file.

I've also recently discovered great tfenv project but you still need to set terraform.path in vscode settings in order for format to work, since extension does not seem to pick up .terraform-version file.

Another piece if vital info on lsp and 0.12: at the moment autocompletion for resource "types" works only if you type them without quotes, i.e. resource aws_. Autocompletion for arguments works either way though.

Added terragrunt error checks in the latest master branch of terraform-lsp(also with tfvars error check and correct path.module) , for now I will be focusing terraform language features before I add terragrunt completion

a nice update: latest master branch have completion for some lazy eval

asciicast

this is anything that is static set(including template file) , I will need to figure what to do with state and loading , but if I have that working, then you guys will get full remote_state completion and error checking as well ;)

also to not clutter the current issue more, terraform-lsp does have gitter channel, so if there is any feature request or questions, then I am mostly online on there as well and will see your messages

Yes, I have terraform 0.12 installed and have the latest version of the extension in vscode

@dvargas92495 I had the same. Make sure you don't have both Indexing, _and_ the Language Server on at the same time. Use one or the other. Currently only the language server checks 0.12 syntax.

maybe there's a way to config using workspace settings which language server to use?

another update time: will push out 0.0.11 next week or so, this one will include several new features and new fixes

Wow! 👍 🙏 Time to enable Github Sponsors? 😄

Incidentally...

Is there a way to ignore the Unkown token IDENT error until 0.0.11 is released?

I was also getting this error even after installing and enabling the new language server, until I restarted vscode - which fixed it 🎉

Hi @juliosueiras @lawrencegripper Thanks for your work for Terraform 0.12 support!

I'm not sure if this is the right place to ask/tell you about this issue but I got errors on 'fine' syntaxes. For example:

variable "instance_type" {
  type        = string
  description = "AWS instance type."
}

Throws this error:
Unknown token: 6:17 IDENT string

Is this a known issue or can I do something to fix this? I'm using TF language server 0.0.9. Or should I just have a few days patience for 0.0.10? 😃

_Edit_: I see it also fails on root level variables. Example:

provider "aws" {
  version = "~> 2.17"
  region = var.project_region
}

Fails with the same message:
Unknown token: 17:12 IDENT var.project_region

In VS Code's settings.json try setting terraform.indexing to false and restarting VS Code.

"terraform.indexing": {
        "enabled": false,
        "liveIndexing": false,
        "delay": 500,
        "exclude": [
            ".terraform/**/*",
            "**/.terraform/**/*"
        ]
    }

Taken from #284, but not sure on side-effects.

It seems to kill some of the auto-complete functionallity which was available in the pre-0.12 version of this extension.

I am getting this error while installing/enabling the latest language server.

Failed starting language server. Error: HttpError: request to https://api.github.com/repos/juliosueiras/terraform-lsp/releases failed, reason: unable to get local issuer certificate

any news to add hcl2 support?

@thiagolsfortunato read the thread please.
just do control+shift+P

then terraform:enable language server

then terraform: install/update server

then restart vscode.

I was been working since lot of month without any problem.

May I suggest we close this issue and take any follow-up questions to issues in the Language Server repository or Gitter?

Why not properly release it then, if it works fine?

One draw back I find of the Language Server is that we loose Auto Complete, Is this expected and should we expect that the LS solution will provide the same feature set as when we turn on Indexing ?

@djsly sorry for the late relay , that is not expected, since the LSP provide full completion of any provider including custom provider(as long as you did a terraform init beforehand)

also I am releasing 0.0.11 past the suppose release time due to the features I am working has to do with state reading(to allow terraform_remote_state), and it is a lot more tricky then I though

I'm getting errors like this for all the resources in tf file: "Resource aws_iam_policy does not exist"
I guess it wants me to run terraform init. Any workaround for this if terraform is used with terragrunt?

@dimisjim There are still a ton of false errors and missing features in lsp so I'm probably gonna have to disable lang server and ignore indexing again.

@Roman-Clumio This is happening for a few resources and data blocks, e.g. https://github.com/juliosueiras/terraform-lsp/issues/18 . Issues for those unexpected errors might be more appropriate for the lsp repo.

I'm looking for a way to ignore specific errors without completely turning off indexing or the lang server in this vscode plugin, but I've yet to find anything.

fix to me after add in settings.json, then restart vscode

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

fix to me after add in settings.json, then restart vscode

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

Tried that but get the following error:
Failed starting language server. Error: HttpError: API rate limit exceeded for 185.5.121.201. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

@mathieupunisher

Failed starting language server. Error: HttpError: API rate limit exceeded for 185.5.121.201. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

That’s Github api error on Lang server’s ‘check for updates’ request , just try again later.

Tried that but get the following error:
Failed starting language server. Error: HttpError: API rate limit exceeded for 185.5.121.201. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

You can run the laguange server locally by downloading from : https://github.com/juliosueiras/terraform-lsp/releases


    "terraform.languageServer": {

        "enabled": true,
        "pathToBinary": "C:\\Temp\\terraform-lsp",
        "args": []
    },

k, I pushed 0.0.11-beta1, this is mostly bugfixes and added basic snippet, as per requested in a issue to have more smaller but frequent release. this is the Roadmap:

  • 0.0.11-beta1: fixes for map and array completion, basic snippet completion
  • 0.0.11 (in 1 week): terraform_remote_state support, state reading for completion, formatting
  • 0.0.12 (in 2 week): indexing, and references
  • 0.0.13 (in 3 week): fixes and enhanced for more complex blocks like dynamic and for eachs

please comment for anything that I am missing

Hi, thank you for your effort.
When trying to update the language server, I'm getting:

Command 'Terraform: Install/Update Language Server' resulted in an error (ETXTBSY: text file is busy, open '/home/user/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-lsp')

@loomsen that happen when there is a terraform in used by LSP in vscode, make sure all terraform code/project are closed before updating

@juliosueiras If I close my terraform workspace and open a new window, I get
Command 'Terraform: Install/Update Language Server' resulted in an error (command 'terraform.installLanguageServer' not found) although it pops up in the command pallette...
Then I tried to disable/enable the language server, and run the update again, resulting in the message above (ETXTBSY).

Opening an ansible folder and trying to update gives me command not found.

@loomsen funny enough, I got the same error yesterday, would need to take a look(only a vim user, using vscode to test for this)

@loomsen @juliosueiras I was able to get past that just now by uninstalling and reinstalling the Terraform extension and then running the install command

@musicislife08 @juliosueiras I can confirm this is working in VSCodium. Thank you for the hint!

I've enabled the language server version 0.0.11-beta1 and the language server crashes continuously. I'm adding here just part of the log as the go routines trace is enormous.

Also, I have hundreds of TF projects in my workspace. The Language server should only parse the ones I actively work on. Just like the Git extension does.

time="2020-04-27T11:08:16+03:00" level=info msg="Log Level is Debug: false"
INFO Server started                               
2020-04-27T11:08:16.756+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:16.793+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:16.818+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4]
2020-04-27T11:08:16.819+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 pid=14754
2020-04-27T11:08:16.820+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4
2020-04-27T11:08:16.846+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4]
2020-04-27T11:08:16.846+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 pid=14762
2020-04-27T11:08:16.846+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4
2020-04-27T11:08:16.859+0300 [INFO]  plugin.terraform-provider-aws_v2.54.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:16.858+0300
2020-04-27T11:08:16.890+0300 [INFO]  plugin.terraform-provider-aws_v2.54.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:16.889+0300
2020-04-27T11:08:16.910+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:16.912+0300 [DEBUG] plugin.terraform-provider-aws_v2.54.0_x4: plugin address: address=/tmp/plugin182103605 network=unix timestamp=2020-04-27T11:08:16.910+0300
2020-04-27T11:08:16.930+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:16.938+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:16.976+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:17.005+0300 [DEBUG] plugin.terraform-provider-aws_v2.54.0_x4: plugin address: address=/tmp/plugin166530709 network=unix timestamp=2020-04-27T11:08:16.974+0300
2020-04-27T11:08:17.100+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 args=[/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4]
2020-04-27T11:08:17.128+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 args=[/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4]
2020-04-27T11:08:17.130+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14783
2020-04-27T11:08:17.130+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4
2020-04-27T11:08:17.131+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14779
2020-04-27T11:08:17.131+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4
2020-04-27T11:08:17.458+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 pid=14754
2020-04-27T11:08:17.458+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:17.459+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:17.459+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:17.466+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-aws_v2.54.0_x4 pid=14762
2020-04-27T11:08:17.466+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:17.470+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:17.476+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:17.538+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-null_v2.1.2_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-null_v2.1.2_x4]
2020-04-27T11:08:17.541+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-null_v2.1.2_x4 pid=14814
2020-04-27T11:08:17.541+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-null_v2.1.2_x4
2020-04-27T11:08:17.543+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-external_v1.2.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-external_v1.2.0_x4]
2020-04-27T11:08:17.543+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-external_v1.2.0_x4 pid=14816
2020-04-27T11:08:17.543+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-external_v1.2.0_x4
2020-04-27T11:08:17.554+0300 [INFO]  plugin.terraform-provider-external_v1.2.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:17.553+0300
2020-04-27T11:08:17.574+0300 [INFO]  plugin.terraform-provider-null_v2.1.2_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:17.574+0300
2020-04-27T11:08:17.652+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:17.652+0300 [DEBUG] plugin.terraform-provider-external_v1.2.0_x4: plugin address: network=unix address=/tmp/plugin543090273 timestamp=2020-04-27T11:08:17.652+0300
2020-04-27T11:08:17.756+0300 [DEBUG] plugin.terraform-provider-null_v2.1.2_x4: plugin address: address=/tmp/plugin244952070 network=unix timestamp=2020-04-27T11:08:17.756+0300
2020-04-27T11:08:17.756+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:17.934+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-external_v1.2.0_x4 pid=14816
2020-04-27T11:08:17.934+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:18.071+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:18.072+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:18.072+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-null_v2.1.2_x4 pid=14814
2020-04-27T11:08:18.072+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:18.154+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:18.168+0300 [INFO]  plugin.terraform-provider-aws_v2.56.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:18.168+0300
2020-04-27T11:08:18.169+0300 [INFO]  plugin.terraform-provider-aws_v2.56.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:18.168+0300
2020-04-27T11:08:18.216+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:18.240+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 args=[/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4]
2020-04-27T11:08:18.255+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14861
2020-04-27T11:08:18.255+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4
2020-04-27T11:08:18.295+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 args=[/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4]
2020-04-27T11:08:18.299+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14866
2020-04-27T11:08:18.299+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4
2020-04-27T11:08:18.303+0300 [DEBUG] plugin.terraform-provider-aws_v2.56.0_x4: plugin address: address=/tmp/plugin462876773 network=unix timestamp=2020-04-27T11:08:18.303+0300
2020-04-27T11:08:18.303+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:18.312+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:18.312+0300 [DEBUG] plugin.terraform-provider-aws_v2.56.0_x4: plugin address: address=/tmp/plugin840275351 network=unix timestamp=2020-04-27T11:08:18.311+0300
2020-04-27T11:08:18.489+0300 [INFO]  plugin.terraform-provider-aws_v2.56.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:18.489+0300
2020-04-27T11:08:18.490+0300 [INFO]  plugin.terraform-provider-aws_v2.56.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:18.488+0300
2020-04-27T11:08:18.687+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:18.689+0300 [DEBUG] plugin.terraform-provider-aws_v2.56.0_x4: plugin address: network=unix address=/tmp/plugin749073860 timestamp=2020-04-27T11:08:18.686+0300
2020-04-27T11:08:18.722+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:18.722+0300 [DEBUG] plugin.terraform-provider-aws_v2.56.0_x4: plugin address: address=/tmp/plugin351125672 network=unix timestamp=2020-04-27T11:08:18.717+0300
2020-04-27T11:08:19.247+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14783
2020-04-27T11:08:19.250+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:19.344+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14861
2020-04-27T11:08:19.344+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:19.355+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14779
2020-04-27T11:08:19.355+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:19.369+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:19.369+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:19.369+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:19.369+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:19.369+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:19.369+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:19.373+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/sre/artifactory-ecs/Terraform/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.56.0_x4 pid=14866
2020-04-27T11:08:19.373+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:19.415+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:19.495+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4]
2020-04-27T11:08:19.496+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 pid=14892
2020-04-27T11:08:19.496+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4
2020-04-27T11:08:19.512+0300 [INFO]  plugin.terraform-provider-template_v2.1.2_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:19.512+0300
2020-04-27T11:08:19.581+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:19.649+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:19.653+0300 [DEBUG] plugin.terraform-provider-template_v2.1.2_x4: plugin address: address=/tmp/plugin446267221 network=unix timestamp=2020-04-27T11:08:19.648+0300
2020-04-27T11:08:19.682+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4]
2020-04-27T11:08:19.683+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 pid=14902
2020-04-27T11:08:19.683+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4
2020-04-27T11:08:19.718+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:19.727+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:19.740+0300 [INFO]  plugin.terraform-provider-template_v2.1.2_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:19.734+0300
2020-04-27T11:08:19.862+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4]
2020-04-27T11:08:19.864+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14908
2020-04-27T11:08:19.865+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4
2020-04-27T11:08:19.882+0300 [DEBUG] plugin.terraform-provider-template_v2.1.2_x4: plugin address: network=unix address=/tmp/plugin818807771 timestamp=2020-04-27T11:08:19.881+0300
2020-04-27T11:08:19.887+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:19.910+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4]
2020-04-27T11:08:19.926+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14919
2020-04-27T11:08:19.926+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4
2020-04-27T11:08:20.016+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 pid=14892
2020-04-27T11:08:20.016+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.054+0300 [INFO]  plugin.terraform-provider-azurerm_v1.44.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:20.050+0300
2020-04-27T11:08:20.069+0300 [INFO]  plugin.terraform-provider-azurerm_v1.44.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:20.069+0300
2020-04-27T11:08:20.091+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:20.091+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:20.119+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-template_v2.1.2_x4 pid=14902 error="signal: killed"
2020-04-27T11:08:20.119+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.136+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:20.151+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:20.168+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:20.168+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: plugin address: network=unix address=/tmp/plugin039498532 timestamp=2020-04-27T11:08:20.165+0300
2020-04-27T11:08:20.195+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: plugin address: address=/tmp/plugin327001596 network=unix timestamp=2020-04-27T11:08:20.195+0300
2020-04-27T11:08:20.208+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:20.239+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4]
2020-04-27T11:08:20.240+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4]
2020-04-27T11:08:20.240+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14934
2020-04-27T11:08:20.240+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4
2020-04-27T11:08:20.240+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14935
2020-04-27T11:08:20.240+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4
2020-04-27T11:08:20.323+0300 [INFO]  plugin.terraform-provider-azurerm_v1.44.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:20.322+0300
2020-04-27T11:08:20.354+0300 [INFO]  plugin.terraform-provider-azurerm_v1.44.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:20.352+0300
2020-04-27T11:08:20.435+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:20.435+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: plugin address: address=/tmp/plugin766451674 network=unix timestamp=2020-04-27T11:08:20.434+0300
2020-04-27T11:08:20.452+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:20.452+0300 [DEBUG] plugin.terraform-provider-azurerm_v1.44.0_x4: plugin address: address=/tmp/plugin342331796 network=unix timestamp=2020-04-27T11:08:20.452+0300
2020-04-27T11:08:20.476+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14908
2020-04-27T11:08:20.476+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.503+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14919
2020-04-27T11:08:20.503+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.603+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14934
2020-04-27T11:08:20.604+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.605+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:20.605+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:20.605+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:20.605+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:20.605+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:20.605+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:20.608+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-azurerm_v1.44.0_x4 pid=14935
2020-04-27T11:08:20.608+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:20.919+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:21.035+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4]
2020-04-27T11:08:21.045+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 pid=14961
2020-04-27T11:08:21.045+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4
2020-04-27T11:08:21.086+0300 [INFO]  plugin.terraform-provider-random_v2.2.1_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:21.084+0300
2020-04-27T11:08:21.206+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:21.226+0300 [DEBUG] plugin.terraform-provider-random_v2.2.1_x4: plugin address: network=unix address=/tmp/plugin627121863 timestamp=2020-04-27T11:08:21.224+0300
2020-04-27T11:08:21.236+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:21.336+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4]
2020-04-27T11:08:21.337+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 pid=14973
2020-04-27T11:08:21.337+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4
2020-04-27T11:08:21.354+0300 [INFO]  plugin.terraform-provider-random_v2.2.1_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:21.353+0300
2020-04-27T11:08:21.444+0300 [DEBUG] plugin.terraform-provider-random_v2.2.1_x4: plugin address: address=/tmp/plugin241545169 network=unix timestamp=2020-04-27T11:08:21.444+0300
2020-04-27T11:08:21.444+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:21.481+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 pid=14961
2020-04-27T11:08:21.481+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:21.699+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-random_v2.2.1_x4 pid=14973
2020-04-27T11:08:21.699+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:21.699+0300 [WARN]  plugin: error closing client during Kill: err="rpc error: code = Canceled desc = grpc: the client connection is closing"
2020-04-27T11:08:21.699+0300 [WARN]  plugin: plugin failed to exit gracefully
2020-04-27T11:08:22.221+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:22.359+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.terraform.d/plugins/linux_amd64/terraform-provider-pingdom_v1.1.1 args=[/home/ovidiu/.terraform.d/plugins/linux_amd64/terraform-provider-pingdom_v1.1.1]
2020-04-27T11:08:22.396+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.terraform.d/plugins/linux_amd64/terraform-provider-pingdom_v1.1.1 pid=14986
2020-04-27T11:08:22.396+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.terraform.d/plugins/linux_amd64/terraform-provider-pingdom_v1.1.1
2020-04-27T11:08:22.478+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:22.485+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:22.492+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:22.531+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 args=[/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4]
2020-04-27T11:08:22.532+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 args=[/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4]
2020-04-27T11:08:22.536+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14992
2020-04-27T11:08:22.536+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4
2020-04-27T11:08:22.536+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14993
2020-04-27T11:08:22.536+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4
2020-04-27T11:08:22.555+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 args=[/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4]
2020-04-27T11:08:22.558+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14995
2020-04-27T11:08:22.558+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4
2020-04-27T11:08:22.586+0300 [INFO]  plugin.terraform-provider-pingdom_v1.1.1: configuring server automatic mTLS: timestamp=2020-04-27T11:08:22.585+0300
2020-04-27T11:08:22.646+0300 [DEBUG] plugin.terraform-provider-pingdom_v1.1.1: plugin address: address=/tmp/plugin258524422 network=unix timestamp=2020-04-27T11:08:22.645+0300
2020-04-27T11:08:22.646+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:22.782+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.terraform.d/plugins/linux_amd64/terraform-provider-pingdom_v1.1.1 pid=14986
2020-04-27T11:08:22.782+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:22.790+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:22.831+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 args=[/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4]
2020-04-27T11:08:22.832+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=15014
2020-04-27T11:08:22.832+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4
2020-04-27T11:08:23.445+0300 [INFO]  plugin.terraform-provider-aws_v2.58.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:23.443+0300
2020-04-27T11:08:23.451+0300 [INFO]  plugin.terraform-provider-aws_v2.58.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:23.450+0300
2020-04-27T11:08:23.461+0300 [INFO]  plugin.terraform-provider-aws_v2.58.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:23.460+0300
2020-04-27T11:08:23.496+0300 [INFO]  plugin.terraform-provider-aws_v2.58.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:23.496+0300
2020-04-27T11:08:23.589+0300 [DEBUG] plugin.terraform-provider-aws_v2.58.0_x4: plugin address: address=/tmp/plugin968675694 network=unix timestamp=2020-04-27T11:08:23.588+0300
2020-04-27T11:08:23.589+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:23.661+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:23.662+0300 [DEBUG] plugin.terraform-provider-aws_v2.58.0_x4: plugin address: address=/tmp/plugin331084662 network=unix timestamp=2020-04-27T11:08:23.660+0300
2020-04-27T11:08:23.690+0300 [DEBUG] plugin.terraform-provider-aws_v2.58.0_x4: plugin address: address=/tmp/plugin016920637 network=unix timestamp=2020-04-27T11:08:23.690+0300
2020-04-27T11:08:23.690+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:23.708+0300 [DEBUG] plugin.terraform-provider-aws_v2.58.0_x4: plugin address: address=/tmp/plugin945026686 network=unix timestamp=2020-04-27T11:08:23.707+0300
2020-04-27T11:08:23.708+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:24.232+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14992
2020-04-27T11:08:24.232+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:24.266+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/network/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14993
2020-04-27T11:08:24.266+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:24.269+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=15014
2020-04-27T11:08:24.269+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:24.269+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/WORK/devops-terraforms/artifactory-production/us-east-1/ebs/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.58.0_x4 pid=14995
2020-04-27T11:08:24.270+0300 [DEBUG] plugin: plugin exited
2020-04-27T11:08:24.588+0300 [INFO]  plugin: configuring client automatic mTLS
2020-04-27T11:08:24.760+0300 [DEBUG] plugin: starting plugin: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-archive_v1.3.0_x4 args=[/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-archive_v1.3.0_x4]
2020-04-27T11:08:24.783+0300 [DEBUG] plugin: plugin started: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-archive_v1.3.0_x4 pid=15055
2020-04-27T11:08:24.783+0300 [DEBUG] plugin: waiting for RPC address: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-archive_v1.3.0_x4
2020-04-27T11:08:25.071+0300 [INFO]  plugin.terraform-provider-archive_v1.3.0_x4: configuring server automatic mTLS: timestamp=2020-04-27T11:08:25.068+0300
2020-04-27T11:08:25.136+0300 [DEBUG] plugin.terraform-provider-archive_v1.3.0_x4: plugin address: address=/tmp/plugin935325526 network=unix timestamp=2020-04-27T11:08:25.136+0300
2020-04-27T11:08:25.136+0300 [DEBUG] plugin: using plugin: version=5
2020-04-27T11:08:25.472+0300 [DEBUG] plugin: plugin process exited: path=/home/ovidiu/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-provider-archive_v1.3.0_x4 pid=15055
2020-04-27T11:08:25.472+0300 [DEBUG] plugin: plugin exited
fatal error: concurrent map writes

goroutine 1741 [running]:
runtime.throw(0x133bdaf, 0x15)
    /usr/local/go/src/runtime/panic.go:774 +0x72 fp=0xc00068b8d0 sp=0xc00068b8a0 pc=0x42f972
runtime.mapassign_faststr(0x1171840, 0xc000492f30, 0xc00201f117, 0x5c, 0x1eca7e0)
    /usr/local/go/src/runtime/map_faststr.go:211 +0x417 fp=0xc00068b938 sp=0xc00068b8d0 pc=0x414c27
github.com/juliosueiras/terraform-lsp/langserver.TextDocumentDidOpen(0x1630d60, 0xc0005ea660, 0xc00201f0a0, 0x63, 0xc000558bb0, 0x9, 0x1, 0xc002154210, 0x2e, 0x0, ...)
    /go/src/github.com/juliosueiras/terraform-lsp/langserver/did_open.go:16 +0x118 fp=0xc00068b9e0 sp=0xc00068b938 pc=0xf92658
runtime.call128(0xc000149080, 0x137b048, 0xc001b44fc0, 0x4800000058)
    /usr/local/go/src/runtime/asm_amd64.s:541 +0x52 fp=0xc00068ba70 sp=0xc00068b9e0 pc=0x45b702
reflect.Value.call(0x11629c0, 0x137b048, 0x13, 0x13295c6, 0x4, 0xc00184b2c0, 0x2, 0x2, 0x18, 0xc00030bbc0, ...)
    /usr/local/go/src/reflect/value.go:460 +0x5f6 fp=0xc00068bc90 sp=0xc00068ba70 pc=0x48e9b6
reflect.Value.Call(0x11629c0, 0x137b048, 0x13, 0xc00184b2c0, 0x2, 0x2, 0x2, 0xc00184b2c0, 0x1)
    /usr/local/go/src/reflect/value.go:321 +0xb4 fp=0xc00068bd10 sp=0xc00068bc90 pc=0x48e174
reflect.Value.Call-fm(0xc00184b2c0, 0x2, 0x2, 0x1, 0xc00030bba0, 0x1)
    /usr/local/go/src/reflect/value.go:318 +0x5a fp=0xc00068bd68 sp=0xc00068bd10 pc=0xf8c4fa
github.com/creachadair/jrpc2/handler.newHandler.func7(0x1630d60, 0xc0005ea660, 0xc000790e00, 0x0, 0x42e71a, 0x0, 0x0)
    /go/src/github.com/juliosueiras/terraform-lsp/vendor/github.com/creachadair/jrpc2/handler/handler.go:222 +0x20a fp=0xc00068be20 sp=0xc00068bd68 pc=0xf8c1da
github.com/creachadair/jrpc2/handler.Func.Handle(0xc00030b640, 0x1630d60, 0xc0005ea660, 0xc000790e00, 0x0, 0x0, 0x1630d60, 0xc0005ea660)
    /go/src/github.com/juliosueiras/terraform-lsp/vendor/github.com/creachadair/jrpc2/handler/handler.go:23 +0x44 fp=0xc00068be68 sp=0xc00068be20 pc=0xf8ae94
github.com/creachadair/jrpc2.(*Server).invoke(0xc0000fc300, 0x1630d60, 0xc000c28660, 0x16128a0, 0xc00030b640, 0xc000790e00, 0x0, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/juliosueiras/terraform-lsp/vendor/github.com/creachadair/jrpc2/server.go:288 +0x177 fp=0xc00068bf28 sp=0xc00068be68 pc=0xf841a7
github.com/creachadair/jrpc2.(*Server).dispatch.func1(0xc00003f720, 0xc0000fc300, 0xc0009e6840)
    /go/src/github.com/juliosueiras/terraform-lsp/vendor/github.com/creachadair/jrpc2/server.go:185 +0xae fp=0xc00068bfc8 sp=0xc00068bf28 pc=0xf86cae
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc00068bfd0 sp=0xc00068bfc8 pc=0x45d301
created by github.com/creachadair/jrpc2.(*Server).dispatch
    /go/src/github.com/juliosueiras/terraform-lsp/vendor/github.com/creachadair/jrpc2/server.go:183 +0x137

Was able to upgrade locally but on a Remote-SSH session I get:
Command 'Terraform: Install/Update Language Server' resulted in an error (command 'terraform.installLanguageServer' not found)
I have tried closing all sessions and reinstalling the extension on the remote host.

Has anyone faced this and come up with a workaround?

@madpipeline i will take a look

@madpipeline are you able to join the gitter channel so I can have more details about the issue?

Sure, if someone gives me the gitter link.

When trying to update the language server, I'm getting:

Command 'Terraform: Install/Update Language Server' resulted in an error (ETXTBSY: text file is busy, open '/home/user/.vscode/extensions/mauve.terraform-1.4.0/lspbin/terraform-lsp')

I had the same problem. I managed to upgrade/downgrade by following these steps:

  1. Disable lsp in settings
    json "terraform.languageServer": { "enabled": false, "args": [] },
  2. Restart vscode
  3. Ctrl+Shift+P, Terraform: Install/Update Language Server
  4. Re-enable lsp in settings
    json "terraform.languageServer": { "enabled": true, "args": [] },
  5. Restart vscode

@juliosueiras If I close my terraform workspace and open a new window, I get Command 'Terraform: Install/Update Language Server' resulted in an error (command 'terraform.installLanguageServer' not found)

It's also worth mentioning that I needed to be in a directory containing some .tf files in order for the extension to be activated.

Thank you for supporting this extension.

Is it the terraform extension or terraform-lsp that writes provider files next to the binary?
I'm on nixos so the bin dir for terraform-lsp is read-only. I've symlinked it to $XDG_DATA_HOME/terraform-lsp/terraform-lsp so the providers get dumped out there instead but I'd rather it did that (or similar) by default.

@06kellyjac this extension put the providers binary, since lsp pick up any provider after ‘terraform init’, this extension predownload a set of common providers binary first to allow lsp work without doing ‘terraform init’

I am unable to get most of the features that are documented as supported working.

https://github.com/mauve/vscode-terraform/issues/313

Opened above issue. My settings are as shown above and I am running latest beta release of the lsp.

Certain code completion works. For example most resources. But anything outside that doesn’t.

I got this message after I upgraded to the latest language server:
Starting Experimental Language Server: Installing/Downloading common providers

The extension just stopped working.

👋 Hey everyone, we just posted an update about the extension on our blog: https://www.hashicorp.com/blog/supporting-the-hashicorp-terraform-extension-for-visual-studio-code

We are working internally on a new version that will have 0.12 support and handle installing and using our new language server by default. For now I'm going to start cleaning up the issues / PRs on the repo in preparation for the new version.

The end of an era!

Exciting!

Wow I am going to miss getting updates on this issue 💯

@mauve has submitted a claim to the BountySource funds. Let's give him a 👍

https://www.bountysource.com/issues/70767330-feat-terraform-0-12-support-was-hcl2-support?show_profile_modal=1

We just released v2.0.0-rc.1 of the extension. The main features include:

  • Added syntax support for 0.12
  • Added terraform-ls usage by default (currently on 0.3.0, which offers basic provider code completion)

You can find additional information and specifics in the release notes and CHANGELOG.

With this release we expect that many of the prior issues and PRs are no longer relevant or have been addressed, and are therefore being closed. If you feel the action taken on an issue or PR is in error, please comment as such and we can figure out the appropriate way to address it.

We plan to add the final 2.0.0 release to the marketplace soon, but are actively seeking your feedback now on the release candidates. You can download the .vsix from the releases page and manually install it in VS Code to try it out.

.tfvars is not recognized by the extension. There is no highlight, no format...
image

.tfvars is not recognized by the extension. There is no highlight, no format...
image

Probably best to put that in a separate issue :slightly_smiling_face:

My VScode no longer auto-format for .tf file ? How i bring my features back ??
I tried alot of guide but it seem not work !

@hungdhm-0574 simply download mauve.terraform-v1.4.0.vsix file from https://github.com/hashicorp/vscode-terraform/releases/tag/v1.4.0, then in VSCode go to View -> Command Palette... -> type "VSIX" (there will be Extensions: Install from VSIX - click it) and select the file you downloaded.

I also disabled 2.0.1 version of extension in "Show Installed Extension" for my workspace, but for me it started to work again even with both versions active.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LogicNinja picture LogicNinja  ·  3Comments

vazkarvishal picture vazkarvishal  ·  5Comments

visokoo picture visokoo  ·  3Comments

kagarlickij picture kagarlickij  ·  5Comments

meysholdt picture meysholdt  ·  5Comments