Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

"Argument names must not be quoted" when argument names must be quoted #385

@fnkr

Description

@fnkr

Prerequisites

  • Ensure you have latest version of plugin installed
  • Search for possible issue duplicates

Installation details

  • IDE version (Help->About->Copy to Clipboard): 2021.3.3
  • intellij-hcl plugin version (Settings->Plugins): 0.7.15
  • Terraform version (terraform -v): 1.1.7

Terraform Configuration Files

resource "helm_release" "this" {
  dynamic "set" {
    for_each = var.foo ? {
      "foo.bar" = "foo"
      "bar.foo" = "bar"
    } : {}
    content {
      name  = set.key
      value = set.value
    }
  }
}

Expected Behavior

The linter should not produce any warnings for this Terraform code.

Actual Behavior

The linter complains that "argument names must not be quoted" even through argument names can be quoted here. In fact, in this case the opposite is true. I must use quotes here since my argument names contain "." and Terraform would evaluate those as variables without the quotes.

Steps to Reproduce

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

  1. Create a new "HashiCorp Configuration Language" scratch file.
  2. Paste the code example from above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions