I am trying to run terraform behind a proxy on Windows. I have already set my proxy on CMD by doing: set HTTP_PROXY and set HTTPS_PROXY.
Here is the error I am getting:
Initializing provider plugins...
- Finding latest version of hashicorp/aws...
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws:
could not connect to registry.terraform.io: Failed to request discovery
document: Get "https://registry.terraform.io/.well-known/terraform.json":
proxyconnect tcp: tls: first record does not look like a TLS handshake
Run Code Online (Sandbox Code Playgroud)
There are no problem in my infrastructure as I have already tried it on another computer with no proxy and it works.
Thank you in advance.
我通过设置环境变量来使用带密码的 terraform 代理,如下所示:
HTTP_PROXY=http://<username>:<password>@<proxy>:<port>
HTTPS_PROXY=http://<username>:<password>@<proxy>:<port>
Run Code Online (Sandbox Code Playgroud)
将HTTPS_PROXY设置为 http url而不是https
| 归档时间: |
|
| 查看次数: |
17444 次 |
| 最近记录: |