aws.cloudfront-cache-policy-data data source¶
Description¶
CachePolicyData resolves one existing CloudFront cache policy by exactly one selector: its id, read directly with GetCachePolicy, or its name, resolved by paging through ListCachePolicies and stopping at the first exact name match. The final output always comes from GetCachePolicy. The ARN is composed locally because CloudFront does not return one for a cache policy read.
Source: internal/service/cloudfront/cache_policy_data_dsrc.go:22
Example usage:
imports: {
aws: 'github.com/cloudboss/unobin-library-aws'
}
data-sources: {
example: aws.cloudfront-cache-policy-data {
# Set input fields here.
}
}
Inputs¶
id
optional(string)
name
optional(string)
Input Constraints¶
Field combinations
Exactly one of id or name.
Outputs¶
id
string
arn
string
comment
string
default-ttl
integer
etag
string
max-ttl
integer
min-ttl
integer
name
string
parameters-in-cache-key-and-forwarded-to-origin
optional(object)
optional(
object({
cookies-config: optional(
object({
cookie-behavior: string
cookies: optional(
object({
items: list(string)
})
)
})
)
enable-accept-encoding-gzip: boolean
headers-config: optional(
object({
header-behavior: string
headers: optional(
object({
items: list(string)
})
)
})
)
query-strings-config: optional(
object({
query-string-behavior: string
query-strings: optional(
object({
items: list(string)
})
)
})
)
enable-accept-encoding-brotli: boolean
})
)