0

I'm trying to use Terraform from inside a corporate network. The host where I'm running Terraform doesn't have access to the internet, so Terraform fails trying to hit the default registry at https://releases.hashicorp.com/.

The corporation allows the use of Artifactory as a read-through proxy to the Terraform registry, meaning that if I wanted to retrieve e.g.

https://releases.hashicorp.com/terraform-provider-azure/0.1.1/terraform-provider-azure_0.1.1_linux_amd64.zip

I could successfully get it from e.g.

https://my-artifactory.net/releases.hashicorp.com/terraform-provider-azure/0.1.1/terraform-provider-azure_0.1.1_linux_amd64.zip

Is there a way to tell Terraform to use a different base URI for the default registry, so that I can make this work?

Mark Slater
  • 831
  • 7
  • 18
  • 1
    If it's just plugin installation does https://www.terraform.io/docs/commands/init.html#plugin-installation help instead? – ydaetskcoR Jun 24 '19 at 13:33
  • @ydaetskcoR I did consider that, but I'd need to manually manage providers and dependencies if I do that. I'm trying to build a pipeline, so I'd also need to add the dependencies to version control or something to make them available on any host that might run the pipeline. – Mark Slater Jun 24 '19 at 14:15
  • 2
    Can I also recommend `terraform-bundle`: https://stackoverflow.com/a/50944611/2291321 ? – ydaetskcoR Jun 24 '19 at 14:20

0 Answers0