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

Error using && Logical Operators #113

Open
rlio opened this issue Nov 30, 2023 · 0 comments
Open

Error using && Logical Operators #113

rlio opened this issue Nov 30, 2023 · 0 comments

Comments

@rlio
Copy link

rlio commented Nov 30, 2023

Hi
using && logical operator in .tf files like
count = var.env == "dev" && length(var.notification) > 0 ? 1 : 0

running blast-radius give an exception like

[2023-11-30 18:00:39,456] ERROR in app: Exception on /graph.json [GET]
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.10/dist-packages/blastradius/server/server.py", line 61, in graph_json
tf = Terraform(os.getcwd())
File "/usr/local/lib/python3.10/dist-packages/blastradius/handlers/terraform.py", line 26, in init
self.config = hcl.load(config_io)
File "/home/user/.local/lib/python3.10/site-packages/hcl/api.py", line 62, in load
return loads(fp.read(), export_comments=export_comments)
File "/home/user/.local/lib/python3.10/site-packages/hcl/api.py", line 81, in loads
return HclParser().parse(s, export_comments=export_comments)
File "/home/user/.local/lib/python3.10/site-packages/hcl/parser.py", line 642, in parse
return self.yacc.parse(
File "/home/user/.local/lib/python3.10/site-packages/hcl/ply/yacc.py", line 330, in parse
lookahead = get_token() # Get the next token
File "/home/user/.local/lib/python3.10/site-packages/hcl/lexer.py", line 391, in token
return self.lex.token()
File "/home/user/.local/lib/python3.10/site-packages/hcl/ply/lex.py", line 388, in token
newtok = self.lexerrorf(tok)
File "/home/user/.local/lib/python3.10/site-packages/hcl/lexer.py", line 364, in t_error
_raise_error(t)
File "/home/user/.local/lib/python3.10/site-packages/hcl/lexer.py", line 19, in _raise_error
raise ValueError(
ValueError: Line 324, column 35, index 7859: Illegal character '&'

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

1 participant