Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No completion with terraform init message #88

Open
mcinquin opened this issue Oct 21, 2020 · 6 comments
Open

No completion with terraform init message #88

mcinquin opened this issue Oct 21, 2020 · 6 comments

Comments

@mcinquin
Copy link

mcinquin commented Oct 21, 2020

Hi,

I have a particular terraform directory structure

terraform
|-- environment
     |-- test
          |-- main.tf
          |-- .terraform
     |-- valid
|-- modules
     |-- gcp
          |-- vpc
               |-- main.tf  
               |-- outputs.tf
               |-- variables.tf
     |-- local
|-- templates

If I create or edit a file in the terraform/environment/test the completion is working well but if I work in the terraform/modules, the completion doesn't work and I have the following message: google_ Did You Forgot to do terraform init? [LS].

I guess it's because he can't find the .terraform file.

How to configure the path where it can find the .terraform folder ?

Regards.

Environment

  • terraform-lsp v0.0.11-beta2
  • coc
  • vim 8
@juliosueiras
Copy link
Owner

interesting, since the current implementation, it searches for .terraform up the directories, but in your use case, it is in a neighboring directory

@juliosueiras
Copy link
Owner

what I can do instead, if is sound good to you, I will add a configuration option, like a file .terraformlsprc that will have the option of specifying .terraform folder location

@mcinquin
Copy link
Author

Hi,

Sounds good to me.

Just a little question: how to enable the debug?

Regards.

@mcinquin
Copy link
Author

any news about this enhancement?

@will-ockmore
Copy link

This would be a fantastic addition. I'm running into a very similar issue with several environments in a sibling directory, which all use a set of shared modules. As most places seem to structure their terraform code differently (no consistent standard), a configuration option for this seems like the most straightforward approach

@mcinquin
Copy link
Author

up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants