-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terraform-ls panics with: value is unknown #447
Comments
Thank you for the bug report and for attaching the relevant log. I think I have a rough idea of what the problem is and how to fix it - will update you when I have a fix or if I need more details. |
I believe that I have a bug fix, but I'm still struggling to come up with a repro case. Would you mind sharing a snippet of code from your configuration to help build one? There is likely an object or a map somewhere with interpolated key(s), such as: foo = {
"${in.ter}-polated" = "bar"
} Unfortunately in all of my attempts keys with interpolation always come back as "unknown" type, so they're already being ignored due to not being string and not hitting the suspected bug/crash. I'd be therefore curious what kind of expressions (references, function calls, ...) you have in the key there. |
Yes, I have the code like that. I have added it (together with other things), and started to observe the crashes. Here is my snippet: variable "env" {
type = map(string)
}
locals {
dns_zones = {
"${var.env.cluster_id}.${var.env.dns_zone_domain}" = replace("${var.env.cluster_id}.${var.env.dns_zone_domain}", ".", "-")
"${var.env.dns_zone_domain}" = "main"
}
} |
Thank you, that helped. 🙏🏻 It's this particular expression: "${var.env.cluster_id}.${var.env.dns_zone_domain}" Adding that to my test case in hashicorp/hcl-lang#29 now... |
Awesome. Thanks for the lightning fast fix! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
terraform-ls
started to crash on my machine.The text was updated successfully, but these errors were encountered: