We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5397b3 commit 0945c77Copy full SHA for 0945c77
examples/complete/main.tf
@@ -140,6 +140,11 @@ module "cloudfront" {
140
ssl_support_method = "sni-only"
141
}
142
143
+ custom_error_response = {
144
+ error_code = 404
145
+ response_page_path = "/errors/404.html"
146
+ }
147
+
148
geo_restriction = {
149
restriction_type = "whitelist"
150
locations = ["NO", "UA", "US", "GB"]
main.tf
@@ -246,7 +246,7 @@ resource "aws_cloudfront_distribution" "this" {
246
247
248
dynamic "custom_error_response" {
249
- for_each = var.custom_error_response
+ for_each = flatten([var.custom_error_response])
250
251
content {
252
error_code = custom_error_response.value["error_code"]
0 commit comments