VladRassokhin / intellij-hcl

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

configuration_aliases support #345

Open si14 opened 3 years ago

si14 commented 3 years ago

New Terraform changed the way alternative providers should be declared in modules, but this plugin doesn't support it yet unfortunately.

Installation details

IDE version:

PyCharm 2021.1.1 (Professional Edition)
Build #PY-211.7142.13, built on April 21, 2021
Licensed to …
You have a perpetual fallback license for this version.
Subscription is active until May 22, 2022.
Runtime version: 11.0.10+9-b1341.41 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: G1 Young Generation, G1 Old Generation
Memory: 1126M
Cores: 16
Non-Bundled Plugins: org.intellij.plugins.hcl (0.7.10), mobi.hsz.idea.gitignore (4.1.0), name.kropp.intellij.makefile (211.6693.108), org.logtalk (1.0.15), org.toml.lang (0.2.150.3968-211), rocks.blackcat.vcl (0.7.2), idea.plugin.protoeditor (2.3.1)

Plugin version: 0.7.10

Terraform version: 1.0.2

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      configuration_aliases = [ aws.replica ]
    }
  }
  required_version = ">= 0.13"
}

resource "aws_kms_key" "foo" {
  provider    = aws.replica
}

Expected Behavior

aws.replica should be autocompleted and marked as correct

Actual Behavior

It gets "unresolved reference replica" error

0xFate commented 2 years ago

seems to be related to https://github.com/VladRassokhin/intellij-hcl/issues/349 which should be reopened

G-Rath commented 2 years ago

@0xFate I don't see how this is related to #349 - that issue is about just about everything being broken, whereas this is about supporting a new feature.