Data Source: aws_cloudfront_origin_request_policy

Example Usage

Basic Usage

data "aws_cloudfront_origin_request_policy" "example" {
  name = "example-policy"
}

AWS-Managed Policies

AWS managed origin request policy names are prefixed with Managed-:

data "aws_cloudfront_origin_request_policy" "ua_referer" {
  name = "Managed-UserAgentRefererHeaders"
}

Argument Reference

This data source supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Cookies Config

cookie_behavior - Determines whether any cookies in viewer requests are included in the origin request key and automatically included in requests that CloudFront sends to the origin. Valid values are none, whitelist all. cookies - Object that contains a list of cookie names. See Items for more information.

Headers Config

header_behavior - Determines whether any HTTP headers are included in the origin request key and automatically included in requests that CloudFront sends to the origin. Valid values are none, whitelist, allViewer, allViewerAndWhitelistCloudFront. headers - Object that contains a list of header names. See Items for more information.

Query String Config

query_string_behavior - Determines whether any URL query strings in viewer requests are included in the origin request key and automatically included in requests that CloudFront sends to the origin. Valid values are none, whitelist, all. query_strings - Object that contains a list of query string names. See Items for more information.

Items

items - List of item names (cookies, headers, or query strings).