terraform-lsp
terraform-lsp copied to clipboard
No completion with terraform init message
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
interesting, since the current implementation, it searches for .terraform up the directories, but in your use case, it is in a neighboring directory
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
Hi,
Sounds good to me.
Just a little question: how to enable the debug?
Regards.
any news about this enhancement?
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
up ?