Module for AWS Cloudfront distribution
| Name | Version |
|---|---|
| terraform | >= 1.0.0 |
| aws | >= 4.50.0 |
| Name | Version |
|---|---|
| aws | >= 4.50.0 |
No modules.
| Name | Type |
|---|---|
| aws_cloudfront_distribution.this | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| aliases | List of extra CNAMEs (alternate domain names), if any, for this distribution | list(string) |
[] |
no |
| allowed_methods | Controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin | list(string) |
n/a | yes |
| cache_policy_id | The unique identifier of the cache policy that is attached to the cache behavior | string |
"" |
no |
| cached_methods | Controls whether CloudFront caches the response to requests using the specified HTTP methods | list(string) |
n/a | yes |
| comment | Any comments you want to include about the distribution | string |
"" |
no |
| compress | Whether you want CloudFront to automatically compress content for web requests that include Accept-Encoding: gzip in the request header |
bool |
false |
no |
| custom_error_response | One or more custom error response elements (multiples allowed) | list(object({ |
[] |
no |
| default_root_object | The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL | string |
"" |
no |
| default_ttl | n/a | number |
3600 |
no |
| enabled | Whether the distribution is enabled to accept end user requests for content | bool |
true |
no |
| field_level_encryption_id | Field level encryption configuration ID | string |
"" |
no |
| forwarded_values | The forwarded values configuration that specifies how CloudFront handles query strings, cookies and headers (maximum one) | object({ |
{ |
no |
| function_association | A config block that triggers a cloudfront function with specific actions (maximum 2) | list(object({ |
[] |
no |
| http_version | The maximum HTTP version to support on the distribution | string |
"http2" |
no |
| is_ipv6_enabled | Whether the IPv6 is enabled for the distribution | bool |
false |
no |
| lambda_function_association | A config block that triggers a lambda function with specific actions (maximum 4) | list(object({ |
[] |
no |
| logging_config | The logging configuration that controls how logs are written to your distribution (maximum one) | object({ |
{ |
no |
| max_ttl | The maximum amount of time (in seconds) that an object is in a CloudFront cache before CloudFront forwards another request to your origin to determine whether the object has been updated. Only effective in the presence of Cache-Control max-age, Cache-Control s-maxage, and Expires headers. |
number |
86400 |
no |
| min_ttl | The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront queries your origin to see whether the object has been updated | number |
0 |
no |
| ordered_cache_behavior | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0 | list(any) |
[] |
no |
| origin | One or more origins for this distribution (multiples allowed) | list(object({ |
n/a | yes |
| origin_group | One or more origin_group for this distribution (multiples allowed) | list(object({ |
[] |
no |
| price_class | The price class for this distribution | string |
"PriceClass_100" |
no |
| realtime_log_config_arn | The ARN of the real-time log configuration that is attached to this cache behavior | string |
"" |
no |
| response_headers_policy_id | The identifier for a response headers policy | string |
"" |
no |
| restrictions | The restriction configuration for this distribution (maximum one) | object({ |
n/a | yes |
| retain_on_delete | Disables the distribution instead of deleting it when destroying the resource through Terraform. If this is set, the distribution needs to be deleted manually afterwards | bool |
false |
no |
| tags | Tags for the CloudFront distribution | object({}) |
{} |
no |
| target_origin_id | The value of ID for the origin that you want CloudFront to route requests to when a request matches the path pattern either for a cache behavior or for the default cache behavior | string |
n/a | yes |
| trusted_key_groups | A list of key group IDs that CloudFront can use to validate signed URLs or signed cookies | list(string) |
[] |
no |
| trusted_signers | List of AWS account IDs (or self) that you want to allow to create signed URLs for private content |
list(string) |
[] |
no |
| viewer_certificate | The SSL configuration for this distribution (maximum one). | object({ |
{} |
no |
| viewer_protocol_policy | Use this element to specify the protocol that users can use to access the files in the origin specified by TargetOriginId when a request matches the path pattern in PathPattern | string |
n/a | yes |
| wait_for_deployment | If enabled, the resource will wait for the distribution status to change from InProgress to Deployed. Setting this to false will skip the process |
bool |
true |
no |
| web_acl_id | A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution | string |
"" |
no |
| Name | Description |
|---|---|
| cloudfront_arn | ARN of the cloudfront distribution |
| domain_name | Domain name |