Skip to content

Commit 43883c6

Browse files
committed
fix: Fixed error when custom_origin_config is missed and set as optional in a variables schema
1 parent d66669f commit 43883c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ resource "aws_cloudfront_distribution" "this" {
9191
}
9292

9393
dynamic "custom_origin_config" {
94-
for_each = length(lookup(origin.value, "custom_origin_config", "")) == 0 ? [] : [lookup(origin.value, "custom_origin_config", "")]
94+
for_each = lookup(origin.value, "custom_origin_config", null) == null ? [] : [lookup(origin.value, "custom_origin_config", {})]
9595

9696
content {
9797
http_port = custom_origin_config.value.http_port

0 commit comments

Comments
 (0)