VladRassokhin / intellij-hcl

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

Unresolved hashmap references #342

Open lionelg3 opened 3 years ago

lionelg3 commented 3 years ago

Installation details

Terraform Configuration Files

variable "artist" {
  type = string
  default = "bob"
}

locals {
  singers = {
    bob = {
      name = "Bob DYLAN"
      style = "rock"
    }
    justin = {
      name = "Justin BIEBER"
      style = "pop"
    }
  }
  artist = local.singers[var.artist]
}

output "ARTIST" {
  value = format("%s : %s", local.artist.name, local.artist.style)
}

Exception

none

Expected Behavior

The "local.artist." should display right autocomplete options. "local.artist.name" and "local.artist.style" should be resolved references.

Actual Behavior

Terraform code works but "local.artist.name" and "local.artist.style" are displayed as "unresolved references" and "local.artist." show wrong autocomplete option.

Steps to Reproduce

Copy theses lines into a new file ans open it with Intellij.