[GH-ISSUE #70] It does not work with terraform cloud to obtain private modules. #34

Closed
opened 2026-05-06 12:36:30 +02:00 by BreizhHardware · 10 comments

Originally created by @nielsbaltodanomatrix on GitHub (Nov 1, 2023).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/70

I can't use the tool with terraform cloud(module in private github) I use terraform cloud to publish the module.

image 2023-11-01_17-32-37
Originally created by @nielsbaltodanomatrix on GitHub (Nov 1, 2023). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/70 I can't use the tool with terraform cloud(module in private github) I use terraform cloud to publish the module. <img width="1202" alt="image" src="https://github.com/patrickchugh/terravision/assets/106764227/cc6cbb72-2d1e-406e-a243-fd067cf4f1f5"> <img width="1301" alt="2023-11-01_17-32-37" src="https://github.com/patrickchugh/terravision/assets/106764227/fbb85f51-7e31-49a5-946e-ed5dfc279681">
Author
Owner

@patrickchugh commented on GitHub (Nov 21, 2023):

@nielsbaltodanomatrix Hello, thank you for your feedback and thanks for testing out Terravision and helping to make this a better product. I have recently completed a major revamp to the code which uses the terraform binary to download source files and generate initial relationships, before augmenting it with source code parsing as before. This is a significant departure from the previous approach and whilst slower, ensures a more accurate output and will handle all terraform in built functions now when encountered in the source. Please do a git pull and re-test again with the latest source code. If your problem is resolved, please close the the thread in github issues and mark it as completed. If not, please give as much detail as you can about the errors and include any source files if possible so I can reproduce your issue. Once again, thanks for helping and look forward to hearing from you soon.

P.

<!-- gh-comment-id:1820019837 --> @patrickchugh commented on GitHub (Nov 21, 2023): @nielsbaltodanomatrix Hello, thank you for your feedback and thanks for testing out Terravision and helping to make this a better product. I have recently completed a major revamp to the code which uses the terraform binary to download source files and generate initial relationships, before augmenting it with source code parsing as before. This is a significant departure from the previous approach and whilst slower, ensures a more accurate output and will handle all terraform in built functions now when encountered in the source. Please do a git pull and re-test again with the latest source code. If your problem is resolved, please close the the thread in github issues and mark it as completed. If not, please give as much detail as you can about the errors and include any source files if possible so I can reproduce your issue. Once again, thanks for helping and look forward to hearing from you soon. P.
Author
Owner

@patrickchugh commented on GitHub (Nov 29, 2023):

can this be closed?

<!-- gh-comment-id:1831530196 --> @patrickchugh commented on GitHub (Nov 29, 2023): can this be closed?
Author
Owner

@jstanesic commented on GitHub (Dec 7, 2023):

Hi @patrickchugh, I have a similiar issue, but my setup and error code are different.
My code is hosted on bitbucket, but I have the repository cloned locally.
Modules are on private terraform cloud.
I am running Terrafvision from WSL.

terravision draw --source /mnt/c/git/repo --varfile ~/terravision/basevars.tfvars

What happens is that terraform starts running, downloads all the modules and completes the plan.
It fails at step:
Loading Sources..
Processing External Module
with error:
ERROR: Cannot connect to Git Repo and Terraform Enterprise server. Check authorisation token, server address and network settings

Is there anything I can do to get more verbose output why it is failing?

<!-- gh-comment-id:1845019648 --> @jstanesic commented on GitHub (Dec 7, 2023): Hi @patrickchugh, I have a similiar issue, but my setup and error code are different. My code is hosted on bitbucket, but I have the repository cloned locally. Modules are on private terraform cloud. I am running Terrafvision from WSL. ``` terravision draw --source /mnt/c/git/repo --varfile ~/terravision/basevars.tfvars ``` What happens is that terraform starts running, downloads all the modules and completes the plan. It fails at step: Loading Sources.. Processing External Module with error: ERROR: Cannot connect to Git Repo and Terraform Enterprise server. Check authorisation token, server address and network settings Is there anything I can do to get more verbose output why it is failing?
Author
Owner

@patrickchugh commented on GitHub (Dec 20, 2023):

@jstanesic have you tried with the latest code?

<!-- gh-comment-id:1865252578 --> @patrickchugh commented on GitHub (Dec 20, 2023): @jstanesic have you tried with the latest code?
Author
Owner

@jstanesic commented on GitHub (Dec 21, 2023):

I did just now. It is the same.

<!-- gh-comment-id:1866474395 --> @jstanesic commented on GitHub (Dec 21, 2023): I did just now. It is the same.
Author
Owner

@patrickchugh commented on GitHub (Dec 28, 2023):

@jstanesic you can add the --debug flag to get more detailed error messages and logs

<!-- gh-comment-id:1871502542 --> @patrickchugh commented on GitHub (Dec 28, 2023): @jstanesic you can add the --debug flag to get more detailed error messages and logs
Author
Owner

@patrickchugh commented on GitHub (Dec 28, 2023):

Can you also try to copy the files to a local folder instead of your /mnt mounted drive? /mnt/c/git/repo may be the issue here

<!-- gh-comment-id:1871502915 --> @patrickchugh commented on GitHub (Dec 28, 2023): Can you also try to copy the files to a local folder instead of your /mnt mounted drive? ```/mnt/c/git/repo``` may be the issue here
Author
Owner

@jstanesic commented on GitHub (Dec 29, 2023):

I have just tried again (with the latest code) with copying files to a local folder and by using the old location. Now plan is getting saved but error I am getting now is ERROR: No AWS, Azure or Google resources will be created with current plan. Exiting.

But in the plan there are multiple resources from Azure.

<!-- gh-comment-id:1871825965 --> @jstanesic commented on GitHub (Dec 29, 2023): I have just tried again (with the latest code) with copying files to a local folder and by using the old location. Now plan is getting saved but error I am getting now is _ERROR: No AWS, Azure or Google resources will be created with current plan. Exiting._ But in the plan there are multiple resources from Azure.
Author
Owner

@jstanesic commented on GitHub (Dec 29, 2023):

I see my mistake and that I misread the README.md about Azure support. I would say that error message is a bit misleading as it makes you believe resources other than AWS are supported at the moment. I manually edited the tfwrapper.py to skip that check and got a blank diagram which is fine seeing Azure is not supported.

Back to the original topic of pulling private modules, it still does not work but work around which I found is change my directory to where terraform code is, run terraform init and then run terravision.

<!-- gh-comment-id:1871833981 --> @jstanesic commented on GitHub (Dec 29, 2023): I see my mistake and that I misread the README.md about Azure support. I would say that error message is a bit misleading as it makes you believe resources other than AWS are supported at the moment. I manually edited the tfwrapper.py to skip that check and got a blank diagram which is fine seeing Azure is not supported. Back to the original topic of pulling private modules, it still does not work but work around which I found is change my directory to where terraform code is, run terraform init and then run terravision.
Author
Owner

@patrickchugh commented on GitHub (Jan 3, 2026):

Closing as basic TFE support is working

<!-- gh-comment-id:3706539296 --> @patrickchugh commented on GitHub (Jan 3, 2026): Closing as basic TFE support is working
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#34
No description provided.