| 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 provider requires no configuration, but accepts an optional host
configuration.
# Ensure an 'Accept: application/json' header is present on all
# checkpoint-api.hashicorp.com requests.
provider "http" {
# Optional host configuration
host {
name = "checkpoint-api.hashicorp.com"
request_headers = {
Accept = "application/json"
}
}
}
data "http" "example" {
url = "https://checkpoint-api.hashicorp.com/v1/check/terraform"
}host(Block List) A host-specific provider configuration. (see below for nested schema)
Required:
name(String) The hostname for which the host configuration should take affect. If the name matches an HTTP request URL's hostname, the provider's host configuration takes affect (in addition to any data- or resource-specific request configuration.
Optional:
request_headers(Map of String, Sensitive) A map of request header field names and values to include in HTTP requests if/when the request URL's hostname matches the provider host configuration name.