I am unable to use our corporate proxy with Terraform. I configured the following environment variables (I'm under Windows 7):

set HTTP_PROXY=http://proxy.company.local:8080
set HTTP_USER=userID
set HTTP_PASSWORD=password

But when launching Terraform init, I get the following error:

Error installing provider "azurerm": Get https://releases.hashicorp.com/terraform-provider-azurerm/: Proxy Authentication Required.

I can't find any documentation on how to configure our troubleshoot a proxy with Terraform. Any thoughts ?

Thanks :)

  • 1
    On Linux typically I need to also set corresponding httpS_proxy environment variables for accessing https URL's via a proxy server i.e set HTTPS_PROXY=http://proxy.company.local:8080 etc. – HBruijn Sep 18 '18 at 14:05
  • 2
    I use Terraform through a proxy most of the time, setting just the two HTTP_PROXY=http://<username>:<password>@<proxy>:<port>/ and HTTPS_PROXY=http://<username>:<password>@<proxy>:<port>/ variables works for me. – bodgit Sep 18 '18 at 14:11

Terraform sends all requests via HTTPS. You have to configure a HTTPS Proxy as well, as in set HTTPS_PROXY=https://proxy.company.local:8443.

  • The OP seems to have a problem with proxy authenication, not with setting a proxy at all. The comment by @bodgit seems to address that. – TorstenS Feb 27 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.