Skip to content

Latest commit

 

History

History
64 lines (52 loc) · 6.68 KB

File metadata and controls

64 lines (52 loc) · 6.68 KB

aws cloudfront-distribution

Creates a CloudFront distribution.

Requirements

Name Version
terraform ~> 1.3
aws >= 4.67.0, < 5.0.0
time ~> 0.9.1

Providers

Name Version
aws >= 4.67.0, < 5.0.0
time ~> 0.9.1

Modules

No modules.

Resources

Name Type
aws_cloudfront_distribution.main resource
aws_cloudfront_origin_access_identity.main resource
time_static.last_update resource

Inputs

Name Description Type Default Required
aliases A list of CNAME aliases (alternate domain names), if any, for this distribution. list(string) [] no
comment Any comments you want to include about the distribution. string null no
custom_error_response A custom error response element (multiples allowed).
list(object({
error_caching_min_ttl = number
error_code = number
response_code = number
response_page_path = string
}))
[] no
customer Customer for the current deployment string "" no
default_cache_behavior A default cache behavior element (required). any
{
"allowed_methods": [
"GET",
"HEAD",
"OPTIONS"
],
"cached_methods": [
"GET",
"HEAD",
"OPTIONS"
],
"compress": true,
"default_ttl": 3600,
"forwarded_values": {
"cookies": {
"forward": "none",
"whitelisted_names": []
},
"headers": [],
"query_string": false
},
"max_ttl": 86400,
"min_ttl": 0,
"smooth_streaming": false,
"target_origin_id": "origin",
"trusted_signers": [],
"viewer_protocol_policy": "allow-all"
}
no
default_root_object The object that you want CloudFront to request from your origin (for example, index.html) when a viewer requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/product-description.html). Specifying a default root object avoids exposing the contents of your distribution. string null no
enabled Whether the distribution is enabled to accept end user requests for content. bool true no
http_version The maximum HTTP version that you want viewers to use to communicate with CloudFront. The default value for new web distributions is http2. Viewers that don't support HTTP/2 automatically use an earlier version. string "http2" no
is_ipv6_enabled Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for your distribution. bool true no
logging_config A logging configuration element (required). map(any)
{
"bucket": "",
"include_cookies": false,
"prefix": ""
}
no
name The name of the route53 zone string "example.com" no
ordered_cache_behavior An ordered cache behavior element (multiples allowed). list(any) [] no
origin An origin element (multiples allowed). list(any) [] no
origin_group An origin group element (multiples allowed).
list(object({
failover_criteria = object({
status_codes = list(number)
})
member = list(object({
origin_id = string
}))
origin_id = string
}))
[] no
price_class The price class for this distribution. One of PriceClass_All, PriceClass_200, PriceClass_100. string "PriceClass_All" no
restrictions A restriction element (required). map(any)
{
"geo_restriction": {
"locations": [],
"restriction_type": "none"
}
}
no
retain_on_delete When destroying this distribution, do not delete the bucket or object, just remove the CloudFront distribution. This is useful if you want to keep your logs bucket. bool false no
tags Default tags to add to resources map(any) {} no
viewer_certificate The SSL configuration for this distribution (maximum one). map(any)
{
"acm_certificate_arn": null,
"cloudfront_default_certificate": true,
"iam_certificate_id": null,
"minimum_protocol_version": null,
"ssl_support_method": "sni-only"
}
no
wait_for_deployment Whether to wait for the distribution deployment to complete. bool true no
web_acl_id The Web Application Firewall (WAF) web ACL, if any, to associate with this distribution. string null no

Outputs

Name Description
arn ARN of the cloudfront distribution
domain_name Domain name of the cloudfront distribution