vscode-terraform: tfvars files are showing as invalid - red underlining everywhere

Extension Version

v2.28.1

VS Code Version

Version: 1.82.2 (user setup) Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d Date: 2023-09-14T05:55:25.390Z Electron: 25.8.1 ElectronBuildId: 23779380 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19044

Operating System

Windows 10 with WSL

Terraform Version

Terraform v1.6.0 on linux_amd64 + provider registry.terraform.io/integrations/github v5.39.0

Steps to Reproduce

Define a .tfvars file and put in a valid config.

Expected Behavior

.tfvars file should shows as valid.

Actual Behavior

image

image

Terraform Configuration

terraform .tfvars file

a = "test"

Project Structure

N/A

Gist

No response

Anything Else?

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

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 4
  • Comments: 17 (7 by maintainers)

Most upvoted comments

A new version 2.28.2 was just released. This fixes the module related issue (#1582). The update should appear automatically in VS Code.

With the correct file type, the behavior for *.tfvars files is now as expected for the reasons Radek mentioned. So I’m closing this issue for now. Thanks for your detailed reports, which made debugging much easier.


In case you experience any different validation related bug, please do let us know through a new issue.

Just downgraded to 2.27.2 and everything went back to normal. 28.0 and 28.1 have the problem.