VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Autocomplete for object variables in modules #299

Open jambt opened 4 years ago

jambt commented 4 years ago

Prerequisites

Installation details

Terraform Configuration Files

In module:

variable "ingress_function" {
  type = object({
    available_memory_mb = string,
    timeout             = number,
  })
}

Using the module:

module "customer" {
  source = "../modules/customer"

  ingress_function = {

  }
}

Exception

No suggestions

Expected Behavior

On pressing Cmd+Space, a list of of possible values should come up (e.g. available_memory_mb, timeout).

Actual Behavior

The text No suggestions appears

Steps to Reproduce

  1. Place cursor inside the ingress_function block
  2. Invoke completion.
sb-travelperk commented 4 years ago

Hey there, As a matter of fact, I have 0.7.8 on another computer and the auto-completion is also limited. From a main.tf / root module, I get auto-completion for my module and it's direct outputs

module.network.vpc       OK

but nothing when going more in-depth :

module.network.vpc.id                 NOT WORKING
module.network.sub-module.subnet      NOT WORKING
module.network.sub-module.subnet.id   NOT WORKING

As my terraform project become bigger and more complicated, not having full auto-completion is becoming a more pressing issue :scream:

schollii commented 3 years ago

I have same issue on one machine, but on the other it works fine. Any suggestions about settings or logs to check? Any implicit requirements?