You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support for CloudFront functions
This follows the naming of Terraform's AWS provider. Lambda@Edge
functions are "lambda functions", whereas CloudFront functions are
simply "functions".
* Auto Format
Co-authored-by: cloudpossebot <[email protected]>
| <aname="input_forward_cookies"></a> [forward\_cookies](#input\_forward\_cookies)| Specifies whether you want CloudFront to forward all or no cookies to the origin. Can be 'all' or 'none' |`string`|`"none"`| no |
409
409
| <aname="input_forward_header_values"></a> [forward\_header\_values](#input\_forward\_header\_values)| A list of whitelisted header values to forward to the origin (incompatible with `cache_policy_id`) |`list(string)`| <pre>[<br> "Access-Control-Request-Headers",<br> "Access-Control-Request-Method",<br> "Origin"<br>]</pre> | no |
410
410
| <aname="input_forward_query_string"></a> [forward\_query\_string](#input\_forward\_query\_string)| Forward query strings to the origin that is associated with this cache behavior (incompatible with `cache_policy_id`) |`bool`|`false`| no |
411
+
| <aname="input_function_association"></a> [function\_association](#input\_function\_association)| A config block that triggers a CloudFront function with specific actions.<br>See the [aws\_cloudfront\_distribution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#function-association)<br>documentation for more information. | <pre>list(object({<br> event_type = string<br> function_arn = string<br> }))</pre> |`[]`| no |
411
412
| <aname="input_geo_restriction_locations"></a> [geo\_restriction\_locations](#input\_geo\_restriction\_locations)| List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) |`list(string)`|`[]`| no |
412
413
| <aname="input_geo_restriction_type"></a> [geo\_restriction\_type](#input\_geo\_restriction\_type)| Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist`|`string`|`"none"`| no |
413
414
| <aname="input_id_length_limit"></a> [id\_length\_limit](#input\_id\_length\_limit)| Limit `id` to this many characters (minimum 6).<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
@@ -416,7 +417,7 @@ Available targets:
416
417
| <aname="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case)| The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. |`string`|`null`| no |
417
418
| <aname="input_label_order"></a> [label\_order](#input\_label\_order)| The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. |`list(string)`|`null`| no |
418
419
| <aname="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case)| The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. |`string`|`null`| no |
419
-
| <aname="input_lambda_function_association"></a> [lambda\_function\_association](#input\_lambda\_function\_association)| A config block that triggers a lambda function with specific actions | <pre>list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))</pre> |`[]`| no |
420
+
| <aname="input_lambda_function_association"></a> [lambda\_function\_association](#input\_lambda\_function\_association)| A config block that triggers a lambda@edge function with specific actions | <pre>list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))</pre> |`[]`| no |
420
421
| <aname="input_log_expiration_days"></a> [log\_expiration\_days](#input\_log\_expiration\_days)| Number of days after object creation to expire Cloudfront Access Log objects.<br>Only effective if `cloudfront_access_log_create_bucket` is `true`. |`number`|`90`| no |
421
422
| <aname="input_log_glacier_transition_days"></a> [log\_glacier\_transition\_days](#input\_log\_glacier\_transition\_days)| Number of days after object creation to move Cloudfront Access Log objects to the glacier tier.<br>Only effective if `cloudfront_access_log_create_bucket` is `true`. |`number`|`60`| no |
422
423
| <aname="input_log_include_cookies"></a> [log\_include\_cookies](#input\_log\_include\_cookies)| DEPRECATED. Use `cloudfront_access_log_include_cookies` instead. |`bool`|`null`| no |
@@ -429,7 +430,7 @@ Available targets:
429
430
| <aname="input_minimum_protocol_version"></a> [minimum\_protocol\_version](#input\_minimum\_protocol\_version)| Cloudfront TLS minimum protocol version.<br>If `var.acm_certificate_arn` is unset, only "TLSv1" can be specified. See: [AWS Cloudfront create-distribution documentation](https://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-distribution.html)<br>and [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) for more information.<br>Defaults to "TLSv1.2\_2019" unless `var.acm_certificate_arn` is unset, in which case it defaults to `TLSv1`|`string`|`""`| no |
430
431
| <aname="input_name"></a> [name](#input\_name)| Solution name, e.g. 'app' or 'jenkins' |`string`|`null`| no |
431
432
| <aname="input_namespace"></a> [namespace](#input\_namespace)| Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' |`string`|`null`| no |
432
-
| <a name="input_ordered_cache"></a> [ordered\_cache](#input\_ordered\_cache) | An ordered list of [cache behaviors](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#cache-behavior-arguments) resource for this distribution.<br>List in order of precedence (first match wins). This is in addition to the default cache policy.<br>Set `target_origin_id` to `""` to specify the S3 bucket origin created by this module. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
433
+
| <a name="input_ordered_cache"></a> [ordered\_cache](#input\_ordered\_cache) | An ordered list of [cache behaviors](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#cache-behavior-arguments) resource for this distribution.<br>List in order of precedence (first match wins). This is in addition to the default cache policy.<br>Set `target_origin_id` to `""` to specify the S3 bucket origin created by this module. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br><br> function_association = list(object({<br> event_type = string<br> function_arn = string<br> }))<br> }))</pre> | `[]` | no |
433
434
| <aname="input_origin_bucket"></a> [origin\_bucket](#input\_origin\_bucket)| Name of an existing S3 bucket to use as the origin. If this is not provided, it will create a new s3 bucket using `var.name` and other context related inputs |`string`|`null`| no |
434
435
| <aname="input_origin_force_destroy"></a> [origin\_force\_destroy](#input\_origin\_force\_destroy)| Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) |`bool`|`false`| no |
435
436
| <aname="input_origin_path"></a> [origin\_path](#input\_origin\_path)| An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. |`string`|`""`| no |
| <aname="input_forward_cookies"></a> [forward\_cookies](#input\_forward\_cookies)| Specifies whether you want CloudFront to forward all or no cookies to the origin. Can be 'all' or 'none' |`string`|`"none"`| no |
89
89
| <aname="input_forward_header_values"></a> [forward\_header\_values](#input\_forward\_header\_values)| A list of whitelisted header values to forward to the origin (incompatible with `cache_policy_id`) |`list(string)`| <pre>[<br> "Access-Control-Request-Headers",<br> "Access-Control-Request-Method",<br> "Origin"<br>]</pre> | no |
90
90
| <aname="input_forward_query_string"></a> [forward\_query\_string](#input\_forward\_query\_string)| Forward query strings to the origin that is associated with this cache behavior (incompatible with `cache_policy_id`) |`bool`|`false`| no |
91
+
| <aname="input_function_association"></a> [function\_association](#input\_function\_association)| A config block that triggers a CloudFront function with specific actions.<br>See the [aws\_cloudfront\_distribution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#function-association)<br>documentation for more information. | <pre>list(object({<br> event_type = string<br> function_arn = string<br> }))</pre> |`[]`| no |
91
92
| <aname="input_geo_restriction_locations"></a> [geo\_restriction\_locations](#input\_geo\_restriction\_locations)| List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) |`list(string)`|`[]`| no |
92
93
| <aname="input_geo_restriction_type"></a> [geo\_restriction\_type](#input\_geo\_restriction\_type)| Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist`|`string`|`"none"`| no |
93
94
| <aname="input_id_length_limit"></a> [id\_length\_limit](#input\_id\_length\_limit)| Limit `id` to this many characters (minimum 6).<br>Set to `0` for unlimited length.<br>Set to `null` for default, which is `0`.<br>Does not affect `id_full`. |`number`|`null`| no |
@@ -96,7 +97,7 @@
96
97
| <aname="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case)| The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. |`string`|`null`| no |
97
98
| <aname="input_label_order"></a> [label\_order](#input\_label\_order)| The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. |`list(string)`|`null`| no |
98
99
| <aname="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case)| The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. |`string`|`null`| no |
99
-
| <aname="input_lambda_function_association"></a> [lambda\_function\_association](#input\_lambda\_function\_association)| A config block that triggers a lambda function with specific actions | <pre>list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))</pre> |`[]`| no |
100
+
| <aname="input_lambda_function_association"></a> [lambda\_function\_association](#input\_lambda\_function\_association)| A config block that triggers a lambda@edge function with specific actions | <pre>list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))</pre> |`[]`| no |
100
101
| <aname="input_log_expiration_days"></a> [log\_expiration\_days](#input\_log\_expiration\_days)| Number of days after object creation to expire Cloudfront Access Log objects.<br>Only effective if `cloudfront_access_log_create_bucket` is `true`. |`number`|`90`| no |
101
102
| <aname="input_log_glacier_transition_days"></a> [log\_glacier\_transition\_days](#input\_log\_glacier\_transition\_days)| Number of days after object creation to move Cloudfront Access Log objects to the glacier tier.<br>Only effective if `cloudfront_access_log_create_bucket` is `true`. |`number`|`60`| no |
102
103
| <aname="input_log_include_cookies"></a> [log\_include\_cookies](#input\_log\_include\_cookies)| DEPRECATED. Use `cloudfront_access_log_include_cookies` instead. |`bool`|`null`| no |
@@ -109,7 +110,7 @@
109
110
| <aname="input_minimum_protocol_version"></a> [minimum\_protocol\_version](#input\_minimum\_protocol\_version)| Cloudfront TLS minimum protocol version.<br>If `var.acm_certificate_arn` is unset, only "TLSv1" can be specified. See: [AWS Cloudfront create-distribution documentation](https://docs.aws.amazon.com/cli/latest/reference/cloudfront/create-distribution.html)<br>and [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) for more information.<br>Defaults to "TLSv1.2\_2019" unless `var.acm_certificate_arn` is unset, in which case it defaults to `TLSv1`|`string`|`""`| no |
110
111
| <aname="input_name"></a> [name](#input\_name)| Solution name, e.g. 'app' or 'jenkins' |`string`|`null`| no |
111
112
| <aname="input_namespace"></a> [namespace](#input\_namespace)| Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' |`string`|`null`| no |
112
-
| <a name="input_ordered_cache"></a> [ordered\_cache](#input\_ordered\_cache) | An ordered list of [cache behaviors](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#cache-behavior-arguments) resource for this distribution.<br>List in order of precedence (first match wins). This is in addition to the default cache policy.<br>Set `target_origin_id` to `""` to specify the S3 bucket origin created by this module. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br> }))</pre> | `[]` | no |
113
+
| <a name="input_ordered_cache"></a> [ordered\_cache](#input\_ordered\_cache) | An ordered list of [cache behaviors](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#cache-behavior-arguments) resource for this distribution.<br>List in order of precedence (first match wins). This is in addition to the default cache policy.<br>Set `target_origin_id` to `""` to specify the S3 bucket origin created by this module. | <pre>list(object({<br> target_origin_id = string<br> path_pattern = string<br><br> allowed_methods = list(string)<br> cached_methods = list(string)<br> compress = bool<br><br> viewer_protocol_policy = string<br> min_ttl = number<br> default_ttl = number<br> max_ttl = number<br><br> forward_query_string = bool<br> forward_header_values = list(string)<br> forward_cookies = string<br><br> lambda_function_association = list(object({<br> event_type = string<br> include_body = bool<br> lambda_arn = string<br> }))<br><br> function_association = list(object({<br> event_type = string<br> function_arn = string<br> }))<br> }))</pre> | `[]` | no |
113
114
| <aname="input_origin_bucket"></a> [origin\_bucket](#input\_origin\_bucket)| Name of an existing S3 bucket to use as the origin. If this is not provided, it will create a new s3 bucket using `var.name` and other context related inputs |`string`|`null`| no |
114
115
| <aname="input_origin_force_destroy"></a> [origin\_force\_destroy](#input\_origin\_force\_destroy)| Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) |`bool`|`false`| no |
115
116
| <aname="input_origin_path"></a> [origin\_path](#input\_origin\_path)| An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. |`string`|`""`| no |
0 commit comments