hashicorp / hashicorp/hcl

Legacy index syntax is not covered in the spec

Open
#305 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation syntax/native v2
Dominant language
Go
Stars
5.8k
Forks
659
Avg merge
20h 36m
Merged PRs (30d)
6

Description

As a compatibility concession for Terraform we added in a legacy alternative syntax for indexing that allows integers as attributes:

foo.bar.0.baz

This is not recommended for use, but since the language supports it we should include it in the spec. In particular, the spec should discuss how to resolve the ambiguity between 1.2 either as a fractional number or as [1][2]. (The "fractional number" interpretation wins, because in practice pre-HCL2 Terraform had no situation where two indexes could be consecutive.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no specification file or test. Locate the language specification and its existing indexing examples, then document the legacy integer-attribute syntax and the rule for resolving 1.2 as a fractional number rather than consecutive indexes.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.