Skip to content

Commit dd9a7a6

Browse files
authored
fix: Avoid adding a null value to concat() function for cache behaviors local variable (#179)
1 parent 501d39e commit dd9a7a6

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
@@ -535,7 +535,7 @@ resource "aws_cloudfront_monitoring_subscription" "this" {
535535
################################################################################
536536

537537
locals {
538-
cache_behaviors = concat([var.default_cache_behavior], var.ordered_cache_behavior)
538+
cache_behaviors = var.ordered_cache_behavior != null ? concat([var.default_cache_behavior], var.ordered_cache_behavior) : [var.default_cache_behavior]
539539
}
540540

541541
data "aws_cloudfront_cache_policy" "this" {

0 commit comments

Comments
 (0)