mirror of
https://github.com/patrickchugh/terravision.git
synced 2026-05-09 08:25:25 +02:00
[GH-ISSUE #121] Unhandled error: <class 'ValueError'>, 'module.vpc.aws_acm_certificate.cert' is not in list, <traceback object at 0xffff8f346bc0> #64
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#64
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 @jonbutland on GitHub (May 13, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/121
I can confirm that module.vpc.aws_acm_certificate.cert exists in my state file, and plan output when I run terraform plan manually.
Traceback (most recent call last):
File "/terravision/terravision", line 289, in
cli(
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/terravision/terravision", line 207, in draw
tfdata = compile_tfdata(source, varfile, workspace, debug, annotate)
File "/terravision/terravision", line 50, in compile_tfdata
tfdata = tfwrapper.tf_makegraph(tfdata)
File "/terravision/modules/tfwrapper.py", line 219, in tf_makegraph
node_id = gvid_table.index(nodename)
ValueError: 'module.vpc.aws_acm_certificate.cert' is not in list
@jonbutland commented on GitHub (May 13, 2024):
Looking at the values for gvid_table and nodename, it appears that "module." is being dropped from gvid_table, but is still present in nodename
@yannik-projectb commented on GitHub (Jun 4, 2024):
@jonbutland facing the same issue over here. did you end up figuring it out by any chance?
@patrickchugh commented on GitHub (Jun 9, 2024):
@jonbutland can you share some sample code so I can reproduce this ?
@jonbutland commented on GitHub (Jun 10, 2024):
@yannik-projectb I got it to draw something by changing node_id = gvid_table.index(nodename) to
in modules/tfwrapper.py, but I'm not sure if the diagram is working as intended as my diagrams seem to lack visualized subnets and autoscaling groups. This also may be because I am not using annotations. When I use this with various serverless projects, mostly lambdas and API gateways or CloudFront and S3 the diagrams seem about right.
@patrickchugh, thanks for the response. this is the code for the cert, not sure how helpful it is though. I think it just happens to be the first item in the list.
The failure is happening after the plan during the "Converting TF Graph Connections.. (this may take a while)" stage. My code is structured with folders for each environment with a main.tf, terraform.tfvars, and vars.tf files, and a modules folder with one or more sub modules depending on the project. I did kinda get it to work with the code I posted above, but I am unsure if the output is the expected output. Pardon my extremely sloppy Python
@zubeyiro commented on GitHub (Jun 11, 2024):
@patrickchugh Im having the same issue, any idea why it might be happening?
@yannik-projectb commented on GitHub (Jun 12, 2024):
@jonbutland thanks a lot for you response here!
Your fix actually got me a tiny bit further. At least
terravisionis now doing its thing.However, I'm stuck on another one here now:
@patrickchugh -- any chance you might be able to help here?
@patrickchugh commented on GitHub (Jun 12, 2024):
Is there any chance I can try it with your source TF files ?
@yannik-projectb commented on GitHub (Jun 12, 2024):
@patrickchugh thanks for your reply!
This is our staging
main.tffile:backend.tfPlease lmk if you need any further info. :)
@kylewin commented on GitHub (Dec 4, 2024):
Same here :(
@chasepo commented on GitHub (Jan 7, 2025):
I was hoping to try out this tool but am hitting the same issue as the others, so i'll keep an eye on this issue. Thanks
@AnasAbdulatif commented on GitHub (Mar 26, 2025):
same error
@miya10kei commented on GitHub (Jul 9, 2025):
same error occured
@patrickchugh commented on GitHub (Jan 3, 2026):
@yannik-projectb @AnasAbdulatif @miya10kei @kylewin I don't have the full variables set to test your code. Can you run terravision with --debug flag and share the tfdata.json so I can try to reproduce this error?
@patrickchugh commented on GitHub (Apr 3, 2026):
Closing as no response and code has significantly changed since this error was reported. Please open a new issue with the updated error message again