Skip to content

Commit

Permalink
fix retention_period default
Browse files Browse the repository at this point in the history
  • Loading branch information
cyuanli committed Sep 2, 2024
1 parent c86102c commit b0a6543
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ resource "google_storage_bucket" "buckets" {
}

dynamic "retention_policy" {
for_each = lookup(var.retention_policy, each.value, {}) != {} ? [var.retention_policy[each.value]] : []
for_each = lookup(var.retention_policy, each.value, {
is_locked = null
retention_period = null
}) != {} ? [var.retention_policy[each.value]] : []
content {
is_locked = lookup(retention_policy.value, "is_locked", null)
retention_period = lookup(retention_policy.value, "retention_period", null)
Expand Down

0 comments on commit b0a6543

Please sign in to comment.