[GH-ISSUE #48] [FEATURE] Add support for locally cached modules #22

Open
opened 2026-05-06 12:36:17 +02:00 by BreizhHardware · 4 comments

Originally created by @masonbivens on GitHub (Aug 21, 2023).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/48

Originally assigned to: @patrickchugh on GitHub.

There should be a mechanism that allows you to leverage modules that have been downloaded already via the terraform init process. This could potentially offer an easy workaround for the different scm platform integrations, until they are fully fleshed out within the application as well.

Originally created by @masonbivens on GitHub (Aug 21, 2023). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/48 Originally assigned to: @patrickchugh on GitHub. There should be a mechanism that allows you to leverage modules that have been downloaded already via the `terraform init` process. This could potentially offer an easy workaround for the different scm platform integrations, until they are fully fleshed out within the application as well.
Author
Owner

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

Good idea. Right now FYI the modules are cached in the hidden folder ~/.terravision and they don't get downloaded the second time if you refer to the same module next time.

<!-- gh-comment-id:1687085762 --> @patrickchugh commented on GitHub (Aug 21, 2023): Good idea. Right now FYI the modules are cached in the hidden folder `~/.terravision` and they don't get downloaded the second time if you refer to the same module next time.
Author
Owner

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

@masonbivens I have updated the code to allow all the SCM integrations that Terraform supports. Please check if this is still necessary ?

<!-- gh-comment-id:1695610066 --> @patrickchugh commented on GitHub (Aug 28, 2023): @masonbivens I have updated the code to allow all the SCM integrations that Terraform supports. Please check if this is still necessary ?
Author
Owner

@masonbivens commented on GitHub (Aug 30, 2023):

So this is the error I'm getting now, it seems like it can't leverage private terraform modules from Gitlab. It may be helpful to be able to leverage a users .terraformrc file for handling the credentials for terraform module registries.

Preflight check..
  dot command detected: /opt/homebrew/bin/dot
  gvpr command detected: /opt/homebrew/bin/gvpr
  git command detected: /opt/homebrew/bin/git
  Added Source Location: .
  Parsing ./outputs.tf
    Found 10 output stanza(s)
  Parsing ./main.tf
    Found 7 resource stanza(s)
  Parsing ./versions.tf
  Parsing ./context.tf
    Found 1 module stanza(s)
Loading Sources..
  Downloading External Module: gitlab.com/foobar-company/terraform-local-labels/local
    Cloning from Terraform registry source: https://gitlab.com/foobar-company/terraform-local-labels/local
0it [00:00, ?it/s]
ERROR: Unable to call Git to clone repository! Check git and SSH fingerprints and keys are correct and ensure the URL https://gitlab.com/foobar-company/terraform-local-labels/local is reachable via CLI.
<!-- gh-comment-id:1699890403 --> @masonbivens commented on GitHub (Aug 30, 2023): So this is the error I'm getting now, it seems like it can't leverage private terraform modules from Gitlab. It may be helpful to be able to leverage a users `.terraformrc` file for handling the credentials for terraform module registries. ``` Preflight check.. dot command detected: /opt/homebrew/bin/dot gvpr command detected: /opt/homebrew/bin/gvpr git command detected: /opt/homebrew/bin/git Added Source Location: . Parsing ./outputs.tf Found 10 output stanza(s) Parsing ./main.tf Found 7 resource stanza(s) Parsing ./versions.tf Parsing ./context.tf Found 1 module stanza(s) Loading Sources.. Downloading External Module: gitlab.com/foobar-company/terraform-local-labels/local Cloning from Terraform registry source: https://gitlab.com/foobar-company/terraform-local-labels/local 0it [00:00, ?it/s] ERROR: Unable to call Git to clone repository! Check git and SSH fingerprints and keys are correct and ensure the URL https://gitlab.com/foobar-company/terraform-local-labels/local is reachable via CLI. ```
Author
Owner

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

@masonbivens Have you tried the latest code? Can I close this issue?

<!-- gh-comment-id:1831531322 --> @patrickchugh commented on GitHub (Nov 29, 2023): @masonbivens Have you tried the latest code? Can I close this issue?
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#22
No description provided.