Skip to content

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

Open
@radeksimko

Description

@radeksimko

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions