diff --git a/S3/main.tf b/S3/main.tf index 74ceac38..70096065 100644 --- a/S3/main.tf +++ b/S3/main.tf @@ -62,7 +62,7 @@ resource "aws_s3_bucket" "this" { # Several blocks - transition dynamic "transition" { - for_each = length(keys(lookup(lifecycle_rule.value, "transition", []))) == 0 ? [] : lookup(lifecycle_rule.value, "transition", []) + for_each = length(keys(lookup(lifecycle_rule.value, "transition", {}))) == 0 ? [] : lookup(lifecycle_rule.value, "transition", {}) content { date = try(transition.value.date, null)