Skip to content
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

Reflect new resource. address and _ escaping block in 0.15.4+ #893

Open
5 tasks
radeksimko opened this issue May 18, 2021 · 0 comments
Open
5 tasks

Reflect new resource. address and _ escaping block in 0.15.4+ #893

radeksimko opened this issue May 18, 2021 · 0 comments
Labels
enhancement New feature or request language-parity Efforts to keep up with additions/changes to Terraform as a language textDocument/definition textDocument/hover textDocument/references textDocument/semanticTokens Semantic syntax highlighting

Comments

@radeksimko
Copy link
Member

radeksimko commented May 18, 2021

Background

See hashicorp/terraform#28709

Introduced in v1.0.0 and backported to 0.15.4

Proposal

hcl-lang

  • Allow blocks to be targeted with additional address via AdditionalAddress in BlockAddrSchema
    • this additional address is matched against origins, understood in hover or semantic highlighting, but not used in completion

terraform-schema

  • AdditionalAddress is added for resource blocks of 0.15.4+
  • Introduce _ block with empty BodySchema for now
    • We can consider adding a special field later if this causes a problem during validation, so that it doesn't get flagged up for "unknown attributes" or "unknown blocks" within
    • We can also/instead consider some changes in the body merging logic in hcl-lang so that we can decode attributes and blocks from within _ but the only benefit would be in contexts where we evaluate expressions (such as Show interpolated expression values on hover #495), so the effort vs value added ratio suggests it's not worth doing.

terraform-ls

  • Updated to latest hcl-lang
  • Updated to latest terrafom-schema
@radeksimko radeksimko added the enhancement New feature or request label May 18, 2021
@radeksimko radeksimko transferred this issue from hashicorp/terraform-schema Apr 25, 2022
@radeksimko radeksimko changed the title Reflect new reserved keywords in 0.15.4 Reflect new resource. address and _ escaping block in 0.15.4+ Apr 25, 2022
@xiehan xiehan added this to the v0.32.0 milestone Oct 27, 2022
@xiehan xiehan added the language-parity Efforts to keep up with additions/changes to Terraform as a language label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language-parity Efforts to keep up with additions/changes to Terraform as a language textDocument/definition textDocument/hover textDocument/references textDocument/semanticTokens Semantic syntax highlighting
Projects
None yet
Development

No branches or pull requests

2 participants