Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ resource "aws_cloudfront_distribution" "bucket" {
}

custom_error_response {
error_code = var.error_code
response_page_path = var.response_page_path
error_caching_min_ttl = var.error_caching_min_ttl
error_code = var.error_code
response_code = var.response_code
response_page_path = var.response_page_path
}

tags = module.labels.tags
Expand Down
19 changes: 17 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ variable "forward_cookies_whitelisted_names" {

variable "error_code" {
type = string
default = "404"
default = "403"
description = "List of forwarded cookie names."
}


variable "response_page_path" {
type = string
default = null
default = "/index.html"
description = "The path of the custom error page (for example, /custom_404.html)."
}

Expand Down Expand Up @@ -320,4 +321,18 @@ variable "cdn_enabled" {
type = bool
default = true
description = "Select Enabled if you want to created CloudFront."
}


variable "response_code" {
type = string
default = "404"
description = "page not found code"
}


variable "error_caching_min_ttl" {
type = string
default = "10"
description = "the value of errro caching min ttl"
}