From 4fb338211f1acf85a83ead186535030060cc9bb3 Mon Sep 17 00:00:00 2001 From: Julieta Aghamyan Date: Mon, 7 Oct 2024 17:53:30 +0400 Subject: [PATCH] fix(DMVP-5400): Add response header policy --- modules/cloudfront/README.md | 1 + modules/cloudfront/distribution.tf | 1 + modules/cloudfront/variables.tf | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/modules/cloudfront/README.md b/modules/cloudfront/README.md index 4d02e733..fe57c67c 100644 --- a/modules/cloudfront/README.md +++ b/modules/cloudfront/README.md @@ -168,6 +168,7 @@ module "cloudfront" { | [acm\_cert\_arn](#input\_acm\_cert\_arn) | ACM certificate arn. | `string` | `""` | no | | [cache\_policy\_id](#input\_cache\_policy\_id) | Unique identifier of the cache policy that is attached to the cache behavior | `string` | `""` | no | | [cloudfront\_default\_certificate](#input\_cloudfront\_default\_certificate) | true if you want viewers to use HTTPS to request your objects and you're using the CloudFront domain name for your distribution. | `bool` | `true` | no | +| [comment](#input\_comment) | Comment for CloudFront | `string` | `""` | no | | [connection\_attempts](#input\_connection\_attempts) | The number of times that CloudFront attempts to connect to the origin. | `number` | `3` | no | | [connection\_timeout](#input\_connection\_timeout) | The number of seconds that CloudFront waits when trying to establish a connection to the origin. | `number` | `10` | no | | [create\_lambda\_security\_headers](#input\_create\_lambda\_security\_headers) | Whether to create and attach a labda function to the distribution or not. | `bool` | `false` | no | diff --git a/modules/cloudfront/distribution.tf b/modules/cloudfront/distribution.tf index 4ea5d8b4..ccb97045 100644 --- a/modules/cloudfront/distribution.tf +++ b/modules/cloudfront/distribution.tf @@ -16,6 +16,7 @@ locals { resource "aws_cloudfront_distribution" "main" { aliases = var.domain_names + comment = var.comment enabled = var.enabled is_ipv6_enabled = var.is_ipv6_enabled price_class = var.price_class diff --git a/modules/cloudfront/variables.tf b/modules/cloudfront/variables.tf index e594898f..afd4865e 100644 --- a/modules/cloudfront/variables.tf +++ b/modules/cloudfront/variables.tf @@ -2,10 +2,18 @@ variable "domain_names" { description = "The list of domain names (aliases) for which cloudfront will used for" type = list(string) } + variable "default_target_origin_id" { description = "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." type = string } + +variable "comment" { + description = "Comment for CloudFront" + type = string + default = "" +} + variable "origins" { description = "Targets, types and custom_origin_config block are needed to create new origins." type = list(any)