-
Notifications
You must be signed in to change notification settings - Fork 132
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
Unexpected Attribute in tfvars #1838
Comments
Hi @theherk, thanks for the report! Unfortunately I can't reproduce the bug right away. In a single directory with two files, everything seems to work as expected. Can you share the LSP log? |
Sure, given the basic directory with contents: variables.tf variable "cname_records" {
type = map(string)
description = "Map of CNAME records, where key is the domain and value is the record value."
} terraform.tfvars cname_records = {
"_cea53b5cd872a2d2d966a339ae031d59.foo.no." = "_8e50420392efe6ae6720f03fd2acd445.nhqijqilxf.acm-validations.aws."
} The resulting lsp.log is: Details
|
I'm hitting the same issue. Or at least, it manifests with the same "Unexpected attribute" in For reference: ❯ terraform version
Terraform v1.9.5
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.68.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.5
+ provider registry.terraform.io/hashicorp/http v3.4.5
+ provider registry.terraform.io/hashicorp/local v2.5.2
+ provider registry.terraform.io/hashicorp/null v3.2.3
+ provider registry.terraform.io/hashicorp/random v3.6.3
+ provider registry.terraform.io/hashicorp/time v0.12.1
+ provider registry.terraform.io/hashicorp/tls v4.0.6 ❯ terraform-ls --version
0.34.3 ❯ nvim --version
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1725453128 My observation is that if there is a In case it mattered: I deleted my I'm no doubt glossing over the importance of (Someone may be along shortly to tell me I've misconfigured something. And that's fine 🙂 I'm always happy to learn something useful.) |
Language Server Version
0.34.3+Homebrew
Terraform Version
Terraform v1.6.6 on darwin_arm64
Client Version
NVIM v0.10.1
Terraform Configuration
Steps to Reproduce
Expected Behavior
I expect not to get any errors, as this is a correct and working configuration.
Actual Behavior
Receive the error
Unexpected attribute: An attribute named "cname_records" is not expected here
.Gist
No response
Workarounds
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: