Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not handling datadict in some cases #189

Open
j2cagle opened this issue Feb 8, 2025 · 0 comments
Open

Not handling datadict in some cases #189

j2cagle opened this issue Feb 8, 2025 · 0 comments
Assignees

Comments

@j2cagle
Copy link

j2cagle commented Feb 8, 2025

Terraform examples exhibiting the problem. Leave the "B" line there and use any of the other "A" lines with the "B" line:

locals { issue = { #A = "foo" == "bar" ? "this" : "that" #A = "foo" == "bar" A = 3 + 1 B = "hello" } }

Error:
Traceback (most recent call last):
File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\lark\parsers\lalr_parser_state.py", line 77, in feed_token
action, arg = states[state][token.type]
KeyError: 'NAME'

Discovered workarounds (just using the first example from above, but works for all of them):
locals { issue_fix1 = { A = ("foo" == "bar") ? "this" : "that" B = "hello" } issue_fix2 = { A = ("foo" == "bar" ? "this" : "that") B = "hello" } issue_fix3 = { A = "foo" == "bar" ? "this" : "that", B = "hello" } }

@kkozik-amplify kkozik-amplify self-assigned this Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants