Skip to content

Commit 90f2f7e

Browse files
committed
Fix CDN when function_association input is null
1 parent dba3421 commit 90f2f7e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ resource "aws_cloudfront_distribution" "cdn" {
8585
cached_methods = ["GET", "HEAD"]
8686

8787
dynamic "function_association" {
88-
for_each = var.function_association
88+
for_each = coalesce(var.function_association, [])
8989

9090
content {
9191
event_type = function_association.value.event_type

0 commit comments

Comments
 (0)