mirror of
https://github.com/patrickchugh/terravision.git
synced 2026-05-09 16:35:30 +02:00
[GH-ISSUE #168] S3 sources for modules takes precedence over local modules #96
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#96
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 @hangrybear666 on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/168
when you define terraform modules with a remote source in e.g. an s3 bucket such as:
then no matter what way I call terravision, it attempts to download this remote module, even if called without AWS and Terraform access using planfile & graphfile.
Meanwhile the module has already been downloaded locally by
terraform initand is available in.terraform/modules.This breaks my CI CD pipelines that create graph and planfiles in one step, then call terravision without internet access for security and isolation in another step
I fixed this by calling
sed -i 's|https://company-domain.s3-eu-west-1.amazonaws.com/terraform-repository/aws-factories/aws-waf-factory/snapshot/aws-waf-factory.tgz|./.terraform/modules/waf|g' main.tfprior to terravision calls but it requires manual checking all terraform code for remote sources.@patrickchugh commented on GitHub (Feb 10, 2026):
So is the solution to this to check if the modules are already available in .terraform/ and skip downloading if they are available ?
@hangrybear666 commented on GitHub (Feb 10, 2026):
Or a flag to force localOnly to put it in the hand of the user and not have to infer it automatically
@patrickchugh commented on GitHub (Mar 1, 2026):
@hangrybear666 I have now changed terravision logic to use terraform's native module cache where available, and then fallback to regular HTTP/Git downloads if the folder cannot be found locally. Please let me know if I can close this?
@hangrybear666 commented on GitHub (Mar 1, 2026):
Will check tomorrow and get back to you. Thank you!
@hangrybear666 commented on GitHub (Mar 2, 2026):
My colleague has broken the pipeline and is not available currently, you can mark this as closed and I'll get back to you if the issue persists down the line. Thank you.