VladRassokhin / intellij-hcl

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

Intellij indexer doesn't recognize source for module when it is included in another module... #369

Closed mjcramer closed 2 years ago

mjcramer commented 2 years ago

Prerequisites

Installation details

Terraform Configuration Files

Place the following in separate module directory named module:

# https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest
module "eks" {
  source  = "terraform-aws-modules/eks/aws"
  version = "18.0.4"

  // other variables here, doesn't matter what
}

Then include this module from a root module:

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

Exception

N/A

Expected Behavior

When the source for this module is not available, intellij highlights the block to indicate a problem and offers to run terraform get to download the source, so that it can do indexing and validate that all the module parameters are correct.

Actual Behavior

It downloads the source for the module in the module but this has no effect. The plugin still cannot recognize the module parameters and offers to download the source. Furthermore, it does not recognize the source that gets downloaded in the root module when terraform init is run.

Steps to Reproduce

Listed above.

mjcramer commented 2 years ago
Screen Shot 2022-01-08 at 14 57 09
mjcramer commented 2 years ago

Duplicate of https://github.com/VladRassokhin/intellij-hcl/issues/365