Skip to content

Commit db40296

Browse files
author
Nikita Dugar
authored
Merge pull request #11 from clouddrove/issue_68
Issue 68
2 parents 2654986 + 97e0ead commit db40296

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ resource "aws_cloudfront_distribution" "bucket" {
8989
}
9090

9191
custom_error_response {
92-
error_code = var.error_code
93-
response_page_path = var.response_page_path
92+
error_caching_min_ttl = var.error_caching_min_ttl
93+
error_code = var.error_code
94+
response_code = var.response_code
95+
response_page_path = var.response_page_path
9496
}
9597

9698
tags = module.labels.tags

variables.tf

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,14 @@ variable "forward_cookies_whitelisted_names" {
243243

244244
variable "error_code" {
245245
type = string
246-
default = "404"
246+
default = "403"
247247
description = "List of forwarded cookie names."
248248
}
249249

250+
250251
variable "response_page_path" {
251252
type = string
252-
default = null
253+
default = "/index.html"
253254
description = "The path of the custom error page (for example, /custom_404.html)."
254255
}
255256

@@ -320,4 +321,18 @@ variable "cdn_enabled" {
320321
type = bool
321322
default = true
322323
description = "Select Enabled if you want to created CloudFront."
324+
}
325+
326+
327+
variable "response_code" {
328+
type = string
329+
default = "404"
330+
description = "page not found code"
331+
}
332+
333+
334+
variable "error_caching_min_ttl" {
335+
type = string
336+
default = "10"
337+
description = "the value of errro caching min ttl"
323338
}

0 commit comments

Comments
 (0)