File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,10 @@ resource "aws_cloudfront_distribution" "bucket" {
89
89
}
90
90
91
91
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
94
96
}
95
97
96
98
tags = module. labels . tags
Original file line number Diff line number Diff line change @@ -243,13 +243,14 @@ variable "forward_cookies_whitelisted_names" {
243
243
244
244
variable "error_code" {
245
245
type = string
246
- default = " 404 "
246
+ default = " 403 "
247
247
description = " List of forwarded cookie names."
248
248
}
249
249
250
+
250
251
variable "response_page_path" {
251
252
type = string
252
- default = null
253
+ default = " /index.html "
253
254
description = " The path of the custom error page (for example, /custom_404.html)."
254
255
}
255
256
@@ -320,4 +321,18 @@ variable "cdn_enabled" {
320
321
type = bool
321
322
default = true
322
323
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"
323
338
}
You can’t perform that action at this time.
0 commit comments