| page_title | Provider: HTTP |
|---|---|
| description | The HTTP provider interacts with HTTP servers. |
The HTTP provider is a utility provider for interacting with generic HTTP servers as part of a Terraform configuration.
# This example makes an HTTP request to `website.com`
# via an HTTP proxy at `corporate.proxy.service`.
provider "http" {
proxy {
url = "https://corporate.proxy.service"
}
}
data "http" "test" {
url = "https://website.com"
}# This example makes an HTTP request to `website.com`
# via an HTTP proxy defined through environment variables (see
# https://pkg.go.dev/net/http#ProxyFromEnvironment for details).
provider "http" {
proxy {
from_env = true
}
}
data "http" "test" {
url = "https://website.com"
}proxy(Attributes) Proxy used by resources and data sources that connect to external endpoints. (see below for nested schema)
Optional:
from_env(Boolean) Whentruethe provider will discover the proxy configuration from environment variables. This is based uponhttp.ProxyFromEnvironmentand it supports the same environment variables (default:true).password(String, Sensitive) Password used for Basic authentication against the Proxy.url(String) URL used to connect to the Proxy. Accepted schemes are:http,https,socks5.username(String) Username (or Token) used for Basic authentication against the Proxy.