Resource Type definition for AWS::CloudFront::CachePolicy
Creates a CloudFront cache policy with enable_accept_encoding_gzip
enabled.
resource "awscc_cloudfront_cache_policy" "example" {
cache_policy_config = {
name = "example-policy"
comment = "test comment"
default_ttl = 50
max_ttl = 100
min_ttl = 1
parameters_in_cache_key_and_forwarded_to_origin = {
enable_accept_encoding_gzip = true
cookies_config = {
cookie_behavior = "whitelist"
cookies = ["example"]
}
headers_config = {
header_behavior = "whitelist"
headers = ["example"]
}
query_strings_config = {
query_string_behavior = "whitelist"
query_strings = ["example"]
}
}
}
}
cache_policy_config
(Attributes) (see below for nested schema)cache_policy_id
(String)id
(String) Uniquely identifies the resource.last_modified_time
(String)cache_policy_config
Required:
default_ttl
(Number)max_ttl
(Number)min_ttl
(Number)name
(String)parameters_in_cache_key_and_forwarded_to_origin
(Attributes) (see below for nested schema)Optional:
comment
(String)cache_policy_config.parameters_in_cache_key_and_forwarded_to_origin
Required:
cookies_config
(Attributes) (see below for nested schema)enable_accept_encoding_gzip
(Boolean)headers_config
(Attributes) (see below for nested schema)query_strings_config
(Attributes) (see below for nested schema)Optional:
enable_accept_encoding_brotli
(Boolean)cache_policy_config.parameters_in_cache_key_and_forwarded_to_origin.cookies_config
Required:
cookie_behavior
(String)Optional:
cookies
(List of String)cache_policy_config.parameters_in_cache_key_and_forwarded_to_origin.headers_config
Required:
header_behavior
(String)Optional:
headers
(List of String)cache_policy_config.parameters_in_cache_key_and_forwarded_to_origin.query_strings_config
Required:
query_string_behavior
(String)Optional:
query_strings
(List of String)Import is supported using the following syntax:
$ terraform import awscc_cloudfront_cache_policy.example <resource ID>