Skip to content

Commit e2da7ac

Browse files
committed
fix handling default nulls in data objects
1 parent 041f17f commit e2da7ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ resource "aws_cloudfront_monitoring_subscription" "this" {
361361
data "aws_cloudfront_cache_policy" "this" {
362362
for_each = toset([
363363
for v in concat([var.default_cache_behavior], var.ordered_cache_behavior) :
364-
v.cache_policy_name if can(v.cache_policy_name)
364+
v.cache_policy_name if can(v.cache_policy_name) && v.cache_policy_name != null
365365
])
366366

367367
name = each.key
@@ -370,7 +370,7 @@ data "aws_cloudfront_cache_policy" "this" {
370370
data "aws_cloudfront_origin_request_policy" "this" {
371371
for_each = toset([
372372
for v in concat([var.default_cache_behavior], var.ordered_cache_behavior) :
373-
v.origin_request_policy_name if can(v.origin_request_policy_name)
373+
v.origin_request_policy_name if can(v.origin_request_policy_name) && v.origin_request_policy_name != null
374374
])
375375

376376
name = each.key
@@ -379,7 +379,7 @@ data "aws_cloudfront_origin_request_policy" "this" {
379379
data "aws_cloudfront_response_headers_policy" "this" {
380380
for_each = toset([
381381
for v in concat([var.default_cache_behavior], var.ordered_cache_behavior) :
382-
v.response_headers_policy_name if can(v.response_headers_policy_name)
382+
v.response_headers_policy_name if can(v.response_headers_policy_name) && v.response_headers_policy_name != null
383383
])
384384

385385
name = each.key

0 commit comments

Comments
 (0)