VladRassokhin / intellij-hcl

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

Interpolation for ${each.key} show an error #261

Closed Pr0Ger closed 4 years ago

Pr0Ger commented 5 years ago

Prerequisites

Installation details

IDE version IntelliJ IDEA 2019.2.2 (Ultimate Edition) Build #IU-192.6603.28, built on September 6, 2019 Licensed to Sergey Petrov Subscription is active until January 9, 2020 Runtime version: 11.0.3+12-b304.56 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.6 GC: ParNew, ConcurrentMarkSweep Memory: 4029M Cores: 8 Registry: ide.editor.tabs.open.at.the.end=true, ide.mac.allowDarkWindowDecorations=true, ide.tooltip.initialDelay=96 Non-Bundled Plugins: AceJump, IdeaVIM, Key Promoter X, com.databricks, com.jetbrains.plugins.ini4idea, com.intellij.plugins.watcher, com.paperetto.dash, name.kropp.intellij.makefile, net.seesharpsoft.intellij.plugins.csv, org.elixir_lang, org.intellij.plugins.hcl, org.jetbrains.plugins.go-template, org.jetbrains.plugins.rest, intellij.prettierJS, org.jetbrains.plugins.go, org.jetbrains.plugins.vue, Dart, io.flutter, Pythonid, org.toml.lang, org.rust.lang, some.awesome

Terraform Configuration Files

resource "cloudflare_record" "test" {
  for_each = {
    "key" = "value"
  }

  domain = each.key
  name   = "${each.key}.something"
  type   = ""
}

Expected Behavior

No errors

Actual Behavior

each inside ${each.key} is marked as unknown resource type (but autocomplete for key/value properties is working)

G-Rath commented 5 years ago

This is pretty annoying, as it adds a decent amount of noise to things :/

Any chance of getting a fix soon?

Andrew-Sheridan commented 4 years ago

Also curious if there is a fix for this in the works.

VladRassokhin commented 4 years ago

Fixed, will be available in 0.7.9