Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.64 KB

File metadata and controls

60 lines (45 loc) · 1.64 KB
page_title Provider: HTTP
description The HTTP provider interacts with HTTP servers.

HTTP Provider

The HTTP provider is a utility provider for interacting with generic HTTP servers as part of a Terraform configuration.

Configuring Proxy

# 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"
}

Schema

Optional

  • proxy (Attributes) Proxy used by resources and data sources that connect to external endpoints. (see below for nested schema)

Nested Schema for proxy

Optional:

  • from_env (Boolean) When true the provider will discover the proxy configuration from environment variables. This is based upon http.ProxyFromEnvironment and 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.