Skip to content

terraform-ls hangs with heredocs inside list values #2021

@szechp

Description

@szechp

Language Server Version

v0.37.0

Terraform Version

Terraform v1.12.2 on darwin_arm64

Client Version

NVIM v0.11.4

Terraform Configuration

provider "helm" {}

resource "helm_release" "argocd" {
  name       = "argocd"
  repository = "https://argoproj.github.io/argo-helm"
  chart      = "argo-cd"
  version    = "8.0.14"
  namespace  = "argocd"

  values = [
    <<-YAML
    redis:
      image:
        repository: ecr-public.aws.com/docker/library/redis
    YAML
  ]
}

Steps to Reproduce

  1. Open the above snippet in Neovim with terraform-ls enabled.
  2. Wait for diagnostics to run.
  3. Observe CPU spikes to ~100% and the editor hangs.
  4. Removing the heredoc (or taking it out of the list) resolves the hang.

the tf module requires a list:
https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release#values-1

Expected Behavior

it should work.

Actual Behavior

it hangs

Gist

No response

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions