英文:
Setting no_proxy for a server - Terraform (infoblox)
问题
你好,我正在尝试使用 Terraform 在 Infoblox 上配置资源。看起来代理正在阻止 IP。如何在我的 Terraform 配置中设置无代理?
```hcl
provider "infoblox" {
username = "这里输入用户名"
password = "这里输入密码"
server = "10.0.0.1"
}
terraform {
required_providers {
infoblox = {
source = "infobloxopen/infoblox"
version = "2.4.1"
}
}
}
错误消息
╷
│ 错误:在网络视图 (default) 中创建网络块失败:WAPI 请求错误:502('502 Connection timed out')
│ 内容:
│ <HEAD><TITLE>Connection timed out</TITLE></HEAD><BODY BGCOLOR="white" FGCOLOR="black"><H1>Connection timed out</H1><HR>
│ <FONT FACE="Helvetica,Arial"><B>
│ 描述:连接超时</B></FONT>
│ <HR>
│ <!-- 默认的“连接超时”响应 (502) -->
│ </BODY>
当我使用以下命令执行 curl 时,它正常工作
export no_proxy=10.0.0.1
curl -kvv -u username:password -c cookies.txt -X GET "https://10.0.0.1/wapi/v2.12/record:host?_return_as_object=1"
此外,在没有代理问题的环境中运行上述配置时,它可以正常工作。
<details>
<summary>英文:</summary>
Hello I am trying to provision resources on Infoblox using terraform. It looks like proxy is blocking the ip. How do I set no proxy in my terraform config?
provider "infoblox" {
username = "The username here"
password = "The password here"
server = "10.0.0.1"
}
terraform {
required_providers {
infoblox = {
source = "infobloxopen/infoblox"
version = "2.4.1"
}
}
}
Error Message
╷
│ Error: Creation of network block failed in network view (default) : WAPI request error: 502('502 Connection timed out')
│ Contents:
│ <HEAD><TITLE>Connection timed out</TITLE></HEAD>
│ <BODY BGCOLOR="white" FGCOLOR="black"><H1>Connection timed out</H1><HR>
│ <FONT FACE="Helvetica,Arial"><B>
│ Description: Connection timed out</B></FONT>
│ <HR>
│ <!-- default "Connection timed out" response (502) -->
│ </BODY>
When I do a curl, it works using the command below
export no_proxy=10.0.0.1
curl -kvv -u username:password -c cookies.txt -X GET "https://10.0.0.1/wapi/v2.12/record:host?_return_as_object=1"
Also, when I run the above configuration in an environment with no proxy issue. It works
</details>
# 答案1
**得分**: 1
export NO_PROXY=10.0.0.1
<details>
<summary>英文:</summary>
Please set the NO_PROXY as well
export NO_PROXY=10.0.0.1
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论