Skip to content

Commit

Permalink
Properly type the default replication filter object (#96)
Browse files Browse the repository at this point in the history
* Properly type the default replication filter object
  • Loading branch information
alexjurkiewicz authored Jul 6, 2021
1 parent 54d3caf commit 8aed497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ resource "aws_s3_bucket" "default" {
# If the corresponding rule requires no filter, an empty configuration block filter {} must be specified.
# See https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket
dynamic "filter" {
for_each = try(rules.value.filter, null) == null ? ["empty"] : [rules.value.filter]
for_each = try(rules.value.filter, null) == null ? [{ prefix = null, tags = {} }] : [rules.value.filter]

content {
prefix = try(filter.value.prefix, try(rules.value.prefix, null))
Expand Down

0 comments on commit 8aed497

Please sign in to comment.