-
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
"no declaration found" for heteregeneous list #1708
Comments
I seem to be having this problem within lookups and joins where the input var is local and is either a list or a map on 2.29.5 also. The variable in question is also interpolated in a string. |
We encounter the same issue. In our case, the code is mapping an object to another and filling defaults - the missing records are a feature we need to reduce verbosity.
|
Have the same issue for months ... |
I observe the same issue at version 2.34.0. Apparently it happens on locals which value is defined with an expression surrounded by WorkaroundUsing the not_found_declaraion_elsewhere = [
for i, letter in ["f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"] :
"/dev/sd${letter}"
]
fixed = concat([
for i, letter in ["f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"] :
"/dev/sd${letter}"
]) |
Extension Version
v2.29.5
VS Code Version
Version: 1.87.2 (Universal)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:21:31.043Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.3.0
Operating System
macOS 14.3 (23D56)
Terraform Version
1.7.5
Steps to Reproduce
Expected Behavior
No errors.
Actual Behavior
local.a
is marked as an error showingNo declaration found
.Terraform Configuration
Project Structure
No response
Gist
No response
Anything Else?
Seems similar to #1698 and disabling "terraform.validation.enableEnhancedValidation" gets rid of the problem.
Either removing
local.a[0]["x"]
or adding a `local.a[1]["x"] so that the objects are homogeneous in format also gets rid of the error.Workarounds
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: