Skip to content

Commit

Permalink
fix: lookup default value for soft delete policy (#318)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Peabody <[email protected]>
  • Loading branch information
alexandre-abrioux and apeabody authored Jul 3, 2024
1 parent 7d8233e commit aa7c57e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ resource "google_storage_bucket" "buckets" {
}

dynamic "soft_delete_policy" {
for_each = [lookup(var.soft_delete_policy, each.value, {})]
for_each = [lookup(var.soft_delete_policy, each.value, {
retention_duration_seconds = null
})]
content {
retention_duration_seconds = lookup(soft_delete_policy.value, "retention_duration_seconds", null)
}
Expand Down

0 comments on commit aa7c57e

Please sign in to comment.