patrickchugh / terravision

Terravision creates Professional Cloud Architecture Diagrams from your Terraform code automatically. Supports AWS, Google and Azure.
Mozilla Public License 2.0
821 stars 78 forks source link

Question: Is it not possible to use only tfstate as input? #129

Open scooter-dangle opened 3 months ago

scooter-dangle commented 3 months ago

Based on the bullets in the README about not needing anything beyond my machine, I was thinking I could run terravision without connecting to any of our AWS resources. I assumed this was achieved by giving it read access to our tfstate file, but my attempts to run it this way result in terraform complaining Unhandled error: <class 'UnboundLocalError'>, cannot access local variable 'r' where it is not associated with a value, <traceback object at 0x…>

The command I'm running is

poetry run terravision draw --source /PATH/TO/TFSTATEFILE

I also tried just pointing it at the terraform directory rather than the state file, which so far resulted in it asking what S3 bucket it should store backend data in.

Am I fundamentally missing how it works?