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 test for `deployment_principal_arns`
* Fix order of nested functions when rendering bucket policy for `deployment_principal_arns` — otherwise an error occurs when comparing types.
* Fix snippet passing incorrect variable name.
* Programatically fix missing leading forward slash for prefixes in Bucket Policy
* Add enablement toggles to all resources in example
* Fix minimum_protocol_version being passed when it won't be honored by AWS i.e. when s3_access_log_bucket_name is true as a result of acm_certificate_arn being unset.
* Fix default for s3_access_log_bucket_name — it is supposed to be empty and there is a check for its length in locals{} that assumes it is empty by default, but it is not empty by default.
| <aname="input_access_log_bucket_name"></a> [access\_log\_bucket\_name](#input\_access\_log\_bucket\_name)| DEPRECATED. Use `s3_access_log_bucket_name` instead. |`string`|`null`| no |
368
368
| <aname="input_acm_certificate_arn"></a> [acm\_certificate\_arn](#input\_acm\_certificate\_arn)| Existing ACM Certificate ARN |`string`|`""`| no |
369
-
| <aname="input_additional_bucket_policy"></a> [additional\_bucket\_policy](#input\_additional\_bucket\_policy)| Additional policies for the bucket. If included in the policies, the variables `${bucket_name}`, `${origin_path}` and `${cloudfront_origin_access_identity_iam_arn}` will be substituted.It is also possible to override the default policy statements by providing statements with `S3GetObjectForCloudFront` and `S3ListBucketForCloudFront` sid. |`string`|`"{}"`| no |
369
+
| <aname="input_additional_bucket_policy"></a> [additional\_bucket\_policy](#input\_additional\_bucket\_policy)| Additional policies for the bucket. If included in the policies, the variables `${bucket_name}`, `${origin_path}` and `${cloudfront_origin_access_identity_iam_arn}` will be substituted.<br>It is also possible to override the default policy statements by providing statements with `S3GetObjectForCloudFront` and `S3ListBucketForCloudFront` sid. |`string`|`"{}"`| no |
370
370
| <aname="input_additional_tag_map"></a> [additional\_tag\_map](#input\_additional\_tag\_map)| Additional tags for appending to tags\_as\_list\_of\_maps. Not added to `tags`. |`map(string)`|`{}`| no |
371
371
| <aname="input_aliases"></a> [aliases](#input\_aliases)| List of FQDN's - Used to set the Alternate Domain Names (CNAMEs) setting on Cloudfront |`list(string)`|`[]`| no |
372
372
| <aname="input_allowed_methods"></a> [allowed\_methods](#input\_allowed\_methods)| List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for AWS CloudFront |`list(string)`| <pre>[<br> "DELETE",<br> "GET",<br> "HEAD",<br> "OPTIONS",<br> "PATCH",<br> "POST",<br> "PUT"<br>]</pre> | no |
@@ -395,8 +395,8 @@ Available targets:
395
395
| <aname="input_default_root_object"></a> [default\_root\_object](#input\_default\_root\_object)| Object that CloudFront return when requests the root URL |`string`|`"index.html"`| no |
396
396
| <aname="input_default_ttl"></a> [default\_ttl](#input\_default\_ttl)| Default amount of time (in seconds) that an object is in a CloudFront cache |`number`|`60`| no |
397
397
| <aname="input_delimiter"></a> [delimiter](#input\_delimiter)| Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
398
-
| <aname="input_deployment_actions"></a> [deployment\_actions](#input\_deployment\_actions)| List of actions to permit `deployment_principal_arns` to perform |`list(string)`| <pre>[<br> "s3:PutObject",<br> "s3:PutObjectAcl",<br> "s3:GetObject",<br> "s3:DeleteObject",<br> "s3:ListBucket",<br> "s3:ListBucketMultipartUploads",<br> "s3:GetBucketLocation",<br> "s3:AbortMultipartUpload"<br>]</pre> | no |
399
-
| <aname="input_deployment_principal_arns"></a> [deployment\_principal\_arns](#input\_deployment\_principal\_arns)| (Optional) Map of IAM Principal ARNs to lists of S3 path prefixes to grant `deployment_actions` permissions.<br>Resource list will include the bucket itself along with all the prefixes. |`map(list(string))`|`{}`| no |
398
+
| <aname="input_deployment_actions"></a> [deployment\_actions](#input\_deployment\_actions)| List of actions to permit `deployment_principal_arns` to perform on bucket and bucket prefixes (see `deployment_principal_arns`) |`list(string)`| <pre>[<br> "s3:PutObject",<br> "s3:PutObjectAcl",<br> "s3:GetObject",<br> "s3:DeleteObject",<br> "s3:ListBucket",<br> "s3:ListBucketMultipartUploads",<br> "s3:GetBucketLocation",<br> "s3:AbortMultipartUpload"<br>]</pre> | no |
399
+
| <aname="input_deployment_principal_arns"></a> [deployment\_principal\_arns](#input\_deployment\_principal\_arns)| (Optional) Map of IAM Principal ARNs to lists of S3 path prefixes to grant `deployment_actions` permissions.<br>Resource list will include the bucket itself along with all the prefixes. Prefixes should not begin with '/'. |`map(list(string))`|`{}`| no |
400
400
| <aname="input_distribution_enabled"></a> [distribution\_enabled](#input\_distribution\_enabled)| Set to `false` to create the distribution but still prevent CloudFront from serving requests. |`bool`|`true`| no |
401
401
| <aname="input_dns_alias_enabled"></a> [dns\_alias\_enabled](#input\_dns\_alias\_enabled)| Create a DNS alias for the CDN. Requires `parent_zone_id` or `parent_zone_name`|`bool`|`false`| no |
402
402
| <aname="input_enabled"></a> [enabled](#input\_enabled)| Set to false to prevent the module from creating any resources |`bool`|`null`| no |
@@ -426,7 +426,7 @@ Available targets:
426
426
| <aname="input_logging_enabled"></a> [logging\_enabled](#input\_logging\_enabled)| DEPRECATED. Use `cloudfront_access_logging_enabled` instead. |`bool`|`null`| no |
427
427
| <aname="input_max_ttl"></a> [max\_ttl](#input\_max\_ttl)| Maximum amount of time (in seconds) that an object is in a CloudFront cache |`number`|`31536000`| no |
428
428
| <aname="input_min_ttl"></a> [min\_ttl](#input\_min\_ttl)| Minimum amount of time that you want objects to stay in CloudFront caches |`number`|`0`| no |
429
-
| <aname="input_minimum_protocol_version"></a> [minimum\_protocol\_version](#input\_minimum\_protocol\_version)| Cloudfront TLS minimum protocol version.See[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.|`string`|`"TLSv1.2_2019"`| no |
429
+
| <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
430
| <aname="input_name"></a> [name](#input\_name)| Solution name, e.g. 'app' or 'jenkins' |`string`|`null`| no |
431
431
| <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
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 |
@@ -443,7 +443,7 @@ Available targets:
443
443
| <aname="input_redirect_all_requests_to"></a> [redirect\_all\_requests\_to](#input\_redirect\_all\_requests\_to)| A hostname to redirect all website requests for this distribution to. If this is set, it overrides other website settings |`string`|`""`| no |
444
444
| <aname="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars)| Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.<br>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. |`string`|`null`| no |
445
445
| <aname="input_routing_rules"></a> [routing\_rules](#input\_routing\_rules)| A json array containing routing rules describing redirect behavior and when redirects are applied |`string`|`""`| no |
446
-
| <aname="input_s3_access_log_bucket_name"></a> [s3\_access\_log\_bucket\_name](#input\_s3\_access\_log\_bucket\_name)| Name of the existing S3 bucket where S3 Access Logs will be delivered. Default is not to enable S3 Access Logging. |`string`|`"foo"`| no |
446
+
| <aname="input_s3_access_log_bucket_name"></a> [s3\_access\_log\_bucket\_name](#input\_s3\_access\_log\_bucket\_name)| Name of the existing S3 bucket where S3 Access Logs will be delivered. Default is not to enable S3 Access Logging. |`string`|`""`| no |
447
447
| <aname="input_s3_access_log_prefix"></a> [s3\_access\_log\_prefix](#input\_s3\_access\_log\_prefix)| Prefix to use for S3 Access Log object keys. Defaults to `logs/${module.this.id}`|`string`|`""`| no |
448
448
| <aname="input_s3_access_logging_enabled"></a> [s3\_access\_logging\_enabled](#input\_s3\_access\_logging\_enabled)| Set `true` to deliver S3 Access Logs to the `s3_access_log_bucket_name` bucket.<br>Defaults to `false` if `s3_access_log_bucket_name` is empty (the default), `true` otherwise.<br>Must be set explicitly if the access log bucket is being created at the same time as this module is being invoked. |`bool`|`null`| no |
449
449
| <aname="input_s3_origins"></a> [s3\_origins](#input\_s3\_origins)| A list of S3 [origins](https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#origin-arguments) (in addition to the one created by this module) for this distribution.<br>S3 buckets configured as websites are `custom_origins`, not `s3_origins`. | <pre>list(object({<br> domain_name = string<br> origin_id = string<br> origin_path = string<br> s3_origin_config = object({<br> origin_access_identity = string<br> })<br> }))</pre> |`[]`| no |
@@ -486,15 +486,14 @@ Like this project? Please give it a ★ on [our GitHub](https://github.com/cloud
486
486
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
487
487
488
488
489
+
489
490
## Related Projects
490
491
491
492
Check out these related projects.
492
493
493
494
-[terraform-aws-cloudfront-cdn](https://github.com/cloudposse/terraform-aws-cloudfront-cdn) - Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
494
495
-[terraform-aws-s3-log-storage](https://github.com/cloudposse/terraform-aws-s3-log-storage) - S3 bucket with built in IAM policy to allow CloudTrail logs
495
496
496
-
497
-
498
497
## Help
499
498
500
499
**Got a question?** We got answers.
@@ -624,8 +623,8 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
0 commit comments