VladRassokhin / intellij-hcl

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

Random Password resource with syntax highlighting and validation error #255

Closed ghost closed 5 years ago

ghost commented 5 years ago

Terraform random_password does not show proper syntactical attribute result like random_string does.

Prerequisites

Installation details

Terraform Configuration Files

resource "random_password" "resource" {
  length  = 16
  special = false
}

resource "kubernetes_secret" "secret-resource" {
  metadata {
    name      = "resource"
    namespace = local.namespace
  }

  data = {
    access-key = random_password.resource.result
  }
}

Exception

None

Expected Behavior

Syntax should be correctly labeled as correct.

Actual Behavior

Syntax does not auto complete result property and marks syntax as invalid. Terraform apply works as expected.

Steps to Reproduce

Load above code into Intellij with HCL syntax plugin and see file is invalid. Terraform apply works properly.

tariq1890 commented 5 years ago

I can confirm this issue. @VladRassokhin Can this be fixed? It is misleading for the HCL plugin to highlight this as a syntax error.

VladRassokhin commented 5 years ago

Already fixed in metadata repo. Will be available in next plugin release.