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
We'd like to ensure that the following new features are not incorrectly presented as errors and, ideally, support code completion and other features for them:
for_each argument inside a provider block. This currently supports only early evaluation, but since we plan to offer fully-dynamic support here before too long it might make sense to just implement code completion as normal expressions in the language server to avoid throwaway work.
provider argument in a resource/data block now supports dynamic instance keys, like aws.by_region["us-west-2"] or aws.by_region[each.key].
providers argument in a module block now also supports dynamic instance keys on the right-hand side of each element, using the same syntax as in the previous point.
Attempted Solutions
n/a
Proposal
Ideally support code completion and other such mechanisms for these new language features, but at the very least make sure that none of the new features are flagged as errors when used correctly.
Related LSP methods
textDocument/completion for the new arguments and their expressions
Possibly textDocument/definition for jumping from a provider reference in a provider/providers argument to the associated provider block, although that's not really for_each-specific so perhaps out of scope.
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:
Language Server Version
n/a (not released yet)
Problem Statement
We'd like to ensure that the following new features are not incorrectly presented as errors and, ideally, support code completion and other features for them:
for_each
argument inside aprovider
block. This currently supports only early evaluation, but since we plan to offer fully-dynamic support here before too long it might make sense to just implement code completion as normal expressions in the language server to avoid throwaway work.provider
argument in aresource
/data
block now supports dynamic instance keys, likeaws.by_region["us-west-2"]
oraws.by_region[each.key]
.providers
argument in amodule
block now also supports dynamic instance keys on the right-hand side of each element, using the same syntax as in the previous point.Attempted Solutions
n/a
Proposal
Ideally support code completion and other such mechanisms for these new language features, but at the very least make sure that none of the new features are flagged as errors when used correctly.
Related LSP methods
textDocument/completion
for the new arguments and their expressionstextDocument/definition
for jumping from a provider reference in aprovider
/providers
argument to the associated provider block, although that's not reallyfor_each
-specific so perhaps out of scope.References
This was one of the deferred tasks from opentofu/opentofu#2123.
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: