Legacy index syntax is not covered in the spec
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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