You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
locals {
# This works fine# service_accounts = [# "serviceAccount:[email protected]",# ]# but this doesn't:service_accounts=[forsain [
"[email protected]",
] :"serviceAccount:${sa}"]
subscribers=local.service_accounts
}
provider"null" {}
resource"null_resource""example" {}
Steps to Reproduce
Save the above config in a file
Run terraform init
See the error in your editor
Expected Behavior
No error being reported
Actual Behavior
An error is reported at the line including subscribers = local.service_accounts. The error message is: Terraform: No declaration found for "local.service_accounts"
Additionally, since the local variable is not identified, additional functionalities such as go to definitions doesn't work for it.
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
The text was updated successfully, but these errors were encountered:
Match function fails to match the local variable, even though it is in the reference targets. Seems that the issue is on hcl-lang module. I may spend more time on this tomorrow to find out where the issue is.
Language Server Version
v0.35.0
Terraform Version
Terraform v1.9.8 on darwin_arm64
Client Version
Neovim (builtin lsp)
Terraform Configuration
Steps to Reproduce
Expected Behavior
No error being reported
Actual Behavior
An error is reported at the line including
subscribers = local.service_accounts
. The error message is:Terraform: No declaration found for "local.service_accounts"
Additionally, since the local variable is not identified, additional functionalities such as go to definitions doesn't work for it.
Gist
No response
Workarounds
No response
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: