I am new to terraform can some one point me what is the issue here ??
Error: Inconsistent conditional result types
│
│ on .terraform\modules\frontend_website.cloudfront\main.tf line 17, in resource "aws_cloudfront_distribution" "www_distribution":
│ 17: for_each = length(var.custom_error_response) == 0 ? [] : var.custom_error_response
│ ├────────────────
│ │ var.custom_error_response is object with 4 attributes
│
│ The true and false result expressions must have consistent types. The given
│ expressions are tuple and object, respectively.
dynamic "custom_error_response" {
for_each = length(var.custom_error_response) == 0 ? [] : var.custom_error_response
content {
error_caching_min_ttl = lookup(custom_error_response.value, "error_caching_min_ttl", "3000")
error_code = lookup(custom_error_response.value, "error_code", "404")
response_code = lookup(custom_error_response.value, "response_code", "200")
response_page_path = lookup(custom_error_response.value, "response_page_path", "/index.html")
}
}