Skip to content

Commit f884573

Browse files
authored
Allow for dynamic optional logging
1 parent a162988 commit f884573

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
@@ -54,7 +54,7 @@ resource "aws_s3_directory_bucket" "this" {
5454
}
5555

5656
resource "aws_s3_bucket_logging" "this" {
57-
count = local.create_bucket && length(keys(var.logging)) > 0 && !var.is_directory_bucket ? 1 : 0
57+
count = local.create_bucket && length(try(keys(var.logging), [])) > 0 && !var.is_directory_bucket ? 1 : 0
5858

5959
region = var.region
6060

0 commit comments

Comments
 (0)