Failed to format TF file when the key value of tag is a number
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 657
- Avg merge
- 20h 36m
- Merged PRs (30d)
- 6
Description
Hi,I had a problem with terraformer. When the key value of the resource tag is a number, formatting TF file fails, which results in the template file not generating normally. Such as :
resource "****" "***"{ tags = { 123 = "123" qwe = "qwe" } }
Error message:
expected: IDENT | STRING | ASSIGN | LBRACE got NUMBER
I think this is a bug, and attributes should be numbers.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported formatting failure with a resource whose tag key is numeric, using the example in the issue. Trace the parser or formatter entry point that reports “expected: IDENT | STRING | ASSIGN | LBRACE got NUMBER”; done means the HCL file formats successfully and the template is generated normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100