VladRassokhin / intellij-hcl

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

"Unresolved reference" when referencing (merged) map from module output #325

Open mtslzr opened 3 years ago

mtslzr commented 3 years ago

Prerequisites

Installation details

PhpStorm 2020.3.2 RC
Build #PS-203.7148.74, built on January 27, 2021
Licensed to Matthew Salazar
You have a perpetual fallback license for this version.
Subscription is active until December 15, 2021.
Runtime version: 11.0.9.1+11-b1145.77 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.2
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: com.arcticicestudio.nord.jetbrains, com.mallowigi, org.intellij.plugins.hcl, com.jetbrains.codeWithMe, de.espend.idea.laravel, ru.adelf.idea.dotenv, name.kropp.intellij.makefile

Hashicorp Terraform / HCL language support 0.7.10

Terraform v0.14.6

Terraform Configuration Files

https://gist.github.com/mtslzr/79f80c13bdfaf2a1a740a416cb03e061

Exception

"Unresolved reference" for any variables under `module.acct.env`.

Expected Behavior

Being able to reference, for example, `module.acct.env.web` properly. It works when running `terraform apply`, so the variable is being set properly. It is only in JetBrains that it shows as unresolved.

Actual Behavior

Auto-complete works up to `env`, but fails after and valid variables show as unresolved.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a module with an exported map (built with merge()).
  2. Import module into a project.
  3. Reference a key under the map.
  4. Run terraform plan and see that the variable works, just not in JetBrains.