VladRassokhin / intellij-hcl

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

Autocompletion does not work for complex object module outputs #279

Closed jpattersonz closed 4 years ago

jpattersonz commented 4 years ago

Prerequisites

Installation details

Terraform Configuration Files

./child/main.tf

output "complex" {
  value = {
    top = {
      middle = {
        bottom = "nope"
      }
    }
  }
}

./main.tf

module "child" {
  source = "./child"
}

output "test" {
  value = module.child.complex.top.middle.bottom
}

Exception

Unresolved reference top

Expected Behavior

top, middle, and bottom should all resolve, as this is valid terraform code in version 0.12.*.

Actual Behavior

top (and thus all three) don't resolve note: terraform validate succeeds

Steps to Reproduce

  1. Place cursor after value = module.child.complex
  2. Invoke completion.
VladRassokhin commented 4 years ago

Will be fixed in upcoming update