mirror of
https://github.com/patrickchugh/terravision.git
synced 2026-05-09 16:35:30 +02:00
[GH-ISSUE #6] Bug: KeyError: 'all_module' when no module #1
Labels
No labels
bug
enhancement
enhancement
good first issue
good first issue
good first issue
pipeline
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/terravision#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Leylan on GitHub (Apr 24, 2023).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/6
Hello,
I have great interest in your project and following it closely.
I've stumble upon what seems to be a bug. When no module is specified in any tf file, terravision raise it as an error.
Parsing locals...
Traceback (most recent call last):
File "//terravision/terravision", line 172, in
cli(
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "//terravision/terravision", line 110, in draw
tfdata = compile_tfdata(source, varfile, annotate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "//terravision/terravision", line 25, in compile_tfdata
tfdata = interpreter.get_metadata(tfdata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/terravision/modules/interpreter.py", line 369, in get_metadata
for _, module_list in tfdata['all_module'].items() :
~~~~~~^^^^^^^^^^^^^^
KeyError: 'all_module'
I have tested it on my terraform modules and with futurice terraform_examples aswell by removing the module manually
@patrickchugh commented on GitHub (Apr 24, 2023):
Hi thanks for the feedback can you post your terraform code so I can try to reproduce the bug?
@Leylan commented on GitHub (Apr 24, 2023):
Sure
backend.tf
It get stuck unless I add an empty dummy module as below
s3.tf
cloudfront.tf
variables.tf
@patrickchugh commented on GitHub (May 14, 2023):
@Leylan Hi Sorry for the delayed response was implementing some other fixes. I have updated the code can you
git pullthe latest code and try again. Here is my output from your sample files:@Leylan commented on GitHub (May 15, 2023):
Working flawlessly now
Thank you very much