amplify-education / python-hcl2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect parsing to list entities

vitaliikalmykov opened this issue · comments

Hello
I have the following tf configuration:
`module "wf_cc" {

source = "../module/3step"
name = "CC"
schedule = "cron(5 23 * * ? *)"
job_1 = module.glue_01.jobs.1
job_2 = module.crawler_02.crawlers.0
job_3 = module.glue_01.jobs.14
}`

Problem is that job_3 entity was not parsed correctly, leaves only first digit and cut everything else:
'job_3': ['${module.glue_01.jobs[1]}']

List entities are supposed to be accessed with []. The spec says

GetAttr = "." Identifier;

14 isn't a valid Identifier so I don't believe your example is valid hcl2. Feel free to reopen if you think I'm interpreting the spec the wrong way.