如何在代理后面设置地形?

How to set up terraform behind proxy?

我正在尝试 运行 在 Windows 上的代理后面进行地形改造。我已经通过以下方式在 CMD 上设置了我的代理:set HTTP_PROXY 和 set HTTPS_PROXY.

这是我遇到的错误:

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 

我的基础架构没有问题,因为我已经在另一台没有代理的计算机上尝试过它并且可以正常工作。

提前致谢。

我正在使用带密码的 terraform 代理,通过设置如下环境变量:

HTTP_PROXY=http://<username>:<password>@<proxy>:<port>
HTTPS_PROXY=http://<username>:<password>@<proxy>:<port>

HTTPS_PROXY设置为httpurl不是https