| page_title | http Ephemeral Resource - terraform-provider-http |
|---|---|
| subcategory | |
| description | The http ephemeral resource makes an HTTP GET request to the given URL and exports information about the response. The given URL may be either an http or https URL. This resource will issue a warning if the result is not UTF-8 encoded. ~> Important Although https URLs can be used, there is currently no mechanism to authenticate the remote server except for general verification of the server certificate's chain of trust. Data retrieved from servers not under your control should be treated as untrustworthy. By default, there are no retries. Configuring the retry block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see go-retryablehttp https://pkg.go.dev/github.com/hashicorp/go-retryablehttp. |
The http ephemeral resource makes an HTTP GET request to the given URL and exports
information about the response.
The given URL may be either an http or https URL. This resource
will issue a warning if the result is not UTF-8 encoded.
~> Important Although https URLs can be used, there is currently no
mechanism to authenticate the remote server except for general verification of
the server certificate's chain of trust. Data retrieved from servers not under
your control should be treated as untrustworthy.
By default, there are no retries. Configuring the retry block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see go-retryablehttp.
url(String) The URL for the request. Supported schemes arehttpandhttps.
ca_cert_pem(String) Certificate Authority (CA) in PEM (RFC 1421) format.client_cert_pem(String) Client certificate in PEM (RFC 1421) format.client_key_pem(String) Client key in PEM (RFC 1421) format.insecure(Boolean) Disables verification of the server's certificate chain and hostname. Defaults tofalsemethod(String) The HTTP Method for the request. Allowed methods are a subset of methods defined in RFC7231 namely,GET,HEAD, andPOST.POSTsupport is only intended for read-only URLs, such as submitting a search.request_body(String) The request body as a string.request_headers(Map of String) A map of request header field names and values.request_timeout_ms(Number) The request timeout in milliseconds.retry(Block, Optional) Retry request configuration. By default there are no retries. Configuring this block will result in retries if an error is returned by the client (e.g., connection errors) or if a 5xx-range (except 501) status code is received. For further details see go-retryablehttp. (see below for nested schema)
body(String, Deprecated) The response body returned as a string. NOTE: This is deprecated, useresponse_bodyinstead.id(String) The URL used for the request.response_body(String) The response body returned as a string.response_body_base64(String) The response body encoded as base64 (standard) as defined in RFC 4648.response_headers(Map of String) A map of response header field names and values. Duplicate headers are concatenated according to RFC2616.status_code(Number) The HTTP response status code.
Optional:
attempts(Number) The number of times the request is to be retried. For example, if 2 is specified, the request will be tried a maximum of 3 times.max_delay_ms(Number) The maximum delay between retry requests in milliseconds.min_delay_ms(Number) The minimum delay between retry requests in milliseconds.