-
Notifications
You must be signed in to change notification settings - Fork 181
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
Variable with empty list causes "No declaration found" on submodules #1592
Comments
I also saw this yesterday - Same issue as above, I set the type as type = list(any) but I still had the error - popped a value in for the default empty list and saved : |
@CapricornVortex, also seen this. For me it often has some delay between save & showing up the error again (or the other way round). |
This comment was marked as off-topic.
This comment was marked as off-topic.
@FeltlP I was able to reproduce this but haven't had the chance to debug it yet. Thanks for the report and for attaching the ZIP file, that's helpful. |
This comment was marked as off-topic.
This comment was marked as off-topic.
We just released a new version 2.29.0. This fixes the reported bug. The update should appear automatically in VS Code. Thank you for the report @FeltlP In case you experience any different validation related bug, please do let us know through a new issue. |
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. |
Extension Version
2.28.1
VS Code Version
Version: 1.83.0 (Universal)
Commit: e7e037083ff4455cf320e344325dacb480062c3c
Date: 2023-10-03T16:13:15.449Z (1 wk ago)
Electron: 25.8.4
ElectronBuildId: 24154031
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.6.1 on darwin_arm64
Steps to Reproduce
Having the following structure: (included in the zip)
no-declaration-found.zip
Expected Behavior
No error, as on version 2.27.2, or to be consistent with terraform validate
Actual Behavior
terraform validate shows no issues, VSCode with extension 2.28.1 shows "No declaration found" on modules/submodule-a/main.tf line 4
Terraform Configuration
No response
Project Structure
. ├── main.tf └── modules ├── submodule-a │ ├── main.tf │ └── variables.tf └── submodule-b └── variables.tf
Gist
No response
Anything Else?
No response
Workarounds
Define the type explicitly on all variable files as type = list(string)
References
#1576
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: