Resource Type definition for AWS::CloudFront::ResponseHeadersPolicy
The example below creates a CloudFront response headers policy.
resource "awscc_cloudfront_response_headers_policy" "example" {
response_headers_policy_config = {
name = "example-policy"
comment = "test comment"
cors_config = {
access_control_allow_credentials = true
access_control_allow_headers = {
items = ["test"]
}
access_control_allow_methods = {
items = ["GET"]
}
access_control_allow_origins = {
items = ["test.example.comtest"]
}
origin_override = true
}
}
}
The example below creates a CloudFront response headers policy with a custom headers config.
resource "awscc_cloudfront_response_headers_policy" "example" {
response_headers_policy_config = {
name = "example-policy"
custom_headers_config = {
items = [
{
header = "X-Permitted-Cross-Domain-Policies"
override = true
value = "none"
}, {
header = "X-Test"
override = true
value = "none"
}
]
}
}
}
The example below creates a CloudFront response headers policy with a custom headers config and server timing headers config.
resource "awscc_cloudfront_response_headers_policy" "example" {
response_headers_policy_config = {
name = "example-headers-policy"
custom_headers_config = {
items = [
{
header = "X-Permitted-Cross-Domain-Policies"
override = true
value = "none"
}
]
}
server_timing_headers_config = {
enabled = true
sampling_rate = 50
}
}
}
response_headers_policy_config
(Attributes) (see below for nested schema)id
(String) Uniquely identifies the resource.last_modified_time
(String)response_headers_policy_id
(String)response_headers_policy_config
Required:
name
(String)Optional:
comment
(String)cors_config
(Attributes) (see below for nested schema)custom_headers_config
(Attributes) (see below for nested schema)remove_headers_config
(Attributes) (see below for nested schema)security_headers_config
(Attributes) (see below for nested schema)server_timing_headers_config
(Attributes) (see below for nested schema)response_headers_policy_config.cors_config
Required:
access_control_allow_credentials
(Boolean)access_control_allow_headers
(Attributes) (see below for nested schema)access_control_allow_methods
(Attributes) (see below for nested schema)access_control_allow_origins
(Attributes) (see below for nested schema)origin_override
(Boolean)Optional:
access_control_expose_headers
(Attributes) (see below for nested schema)access_control_max_age_sec
(Number)response_headers_policy_config.cors_config.access_control_allow_headers
Required:
items
(List of String)response_headers_policy_config.cors_config.access_control_allow_methods
Required:
items
(List of String)response_headers_policy_config.cors_config.access_control_allow_origins
Required:
items
(List of String)response_headers_policy_config.cors_config.access_control_expose_headers
Required:
items
(List of String)response_headers_policy_config.custom_headers_config
Required:
items
(Attributes List) (see below for nested schema)response_headers_policy_config.custom_headers_config.items
Required:
header
(String)override
(Boolean)value
(String)response_headers_policy_config.remove_headers_config
Required:
items
(Attributes Set) (see below for nested schema)response_headers_policy_config.remove_headers_config.items
Required:
header
(String)response_headers_policy_config.security_headers_config
Optional:
content_security_policy
(Attributes) (see below for nested schema)content_type_options
(Attributes) (see below for nested schema)frame_options
(Attributes) (see below for nested schema)referrer_policy
(Attributes) (see below for nested schema)strict_transport_security
(Attributes) (see below for nested schema)xss_protection
(Attributes) (see below for nested schema)response_headers_policy_config.security_headers_config.content_security_policy
Required:
content_security_policy
(String)override
(Boolean)response_headers_policy_config.security_headers_config.content_type_options
Required:
override
(Boolean)response_headers_policy_config.security_headers_config.frame_options
Required:
frame_option
(String)override
(Boolean)response_headers_policy_config.security_headers_config.referrer_policy
Required:
override
(Boolean)referrer_policy
(String)response_headers_policy_config.security_headers_config.strict_transport_security
Required:
access_control_max_age_sec
(Number)override
(Boolean)Optional:
include_subdomains
(Boolean)preload
(Boolean)response_headers_policy_config.security_headers_config.xss_protection
Required:
override
(Boolean)protection
(Boolean)Optional:
mode_block
(Boolean)report_uri
(String)response_headers_policy_config.server_timing_headers_config
Required:
enabled
(Boolean)Optional:
sampling_rate
(Number)Import is supported using the following syntax:
$ terraform import awscc_cloudfront_response_headers_policy.example <resource ID>