-
Notifications
You must be signed in to change notification settings - Fork 146
Description
when you define terraform modules with a remote source in e.g. an s3 bucket such as:
module "waf" {
source = "https://company-domain.s3-eu-west-1.amazonaws.com/terraform-repository/aws-factories/aws-waf-factory/snapshot/aws-waf-factory.tgz"
}
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 init and 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.tf prior to terravision calls but it requires manual checking all terraform code for remote sources.