terraform-ls icon indicating copy to clipboard operation
terraform-ls copied to clipboard

Incorrect attributes for data.cloudflare_zones

Open danihodovic opened this issue 9 months ago • 2 comments
trafficstars

Language Server Version

v0.36.3

Terraform Version

v1.10.5 on Linux

Client Version

NVIM v0.10.3

Terraform Configuration

data "cloudflare_zones" "search" {
  name = "newlantern.ai"
}

Steps to Reproduce

Use the above code which is valid when performing a terraform apply, but invalid using the language server.

terraform/rad-associates/domains/main.tf|33-35 col 34-2 error| [Terraform] Too few blocks specified for "filter": At least 1 block(s) are expected for "filter" [E]
terraform/rad-associates/domains/main.tf|34 col 3-25 error| [Terraform] Unexpected attribute: An attribute named "name" is not expected here [E]

Expected Behavior

No linting errors

Actual Behavior

See above

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

danihodovic avatar Feb 05 '25 19:02 danihodovic

Which version of the cloudflare provider are you using? Cloudflare recently released version 5 of their provider with some major changes and it seems like the language server is somehow still using old version here

michaelfeinbier avatar Feb 07 '25 15:02 michaelfeinbier

$ terraform providers -v
Terraform v1.10.5
on linux_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v5.0.0

danihodovic avatar Feb 07 '25 16:02 danihodovic