-
Notifications
You must be signed in to change notification settings - Fork 180
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
Valid tfvars found outside of root configuration reporting as incorrect syntax #1574
Comments
This is helpful, thank you @sheppyj It looks like we didn't give enough consideration to manually loaded I think the best solution for now may be just excluding any non-autoloaded tfvars files from validation entirely as we cannot tell which module to they belong to. I will look into implementing that patch. |
We actually already ignore non-autoloaded Admittedly we still compute the diagnostics in this case but avoid publishing them. It's not a user-visible problem right now nonetheless. What we do not account for however is a situation of a I have a patch which seems to be addressing the problem based on quick manual testing: I will post update when it gets merged & reaches a release. |
@radeksimko I've same issue with *.tfvars' "Unexpected attribute" outside of module. plugin version is 2.28.2, what else I can check? |
@ufonalim Please file a new issue and attach more details, we'll be happy to look into it. Just because the error message is the same does not always mean it's (a) the same bug, or (b) it is a bug at all. Thanks! |
Extension Version
2.28.0
VS Code Version
Version: 1.82.2 (Universal)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:59:47.790Z (3 wks ago)
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 22.6.0
Operating System
macOS Ventura 13.6 (22G120)
Terraform Version
Terraform v1.4.6 on darwin_arm64
Steps to Reproduce
valid tfvars file reporting as having incorrect syntax;
Expected Behavior
Valid HCL tfvars aren't highlighted.
Actual Behavior
Error;
Unexpected attribute: An attribute named "test" is not expected here Terraform
Terraform Configuration
Project Structure
. ├── environment │ └── dev │ └── terraform.tfvars └── output.tf
Gist
No response
Anything Else?
No response
Workarounds
Dragging and dropping tfvars into root directory appear to work, syntax highlighting seems to behave as expected.
Reverting to previous version of extension 2.27.2
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: