Skip to content

Commit

Permalink
Clean up locals.
Browse files Browse the repository at this point in the history
  • Loading branch information
korenyoni committed Jan 16, 2022
1 parent 43b2b53 commit e6bab0c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/complete/replication.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
locals {
replication_enabled = var.s3_replication_enabled
replication_rules = local.replication_enabled ? [
s3_replication_rules = var.s3_replication_enabled ? [
{
id = "replication-test-explicit-bucket"
status = "Enabled"
Expand Down Expand Up @@ -28,11 +27,10 @@ locals {
}
}
] : []
s3_replication_rules = local.replication_rules
}

module "s3_bucket_replication_target" {
count = local.replication_enabled ? 1 : 0
count = local.s3_replication_enabled ? 1 : 0

source = "../../"

Expand All @@ -47,7 +45,7 @@ module "s3_bucket_replication_target" {
}

module "s3_bucket_replication_target_extra" {
count = local.replication_enabled ? 1 : 0
count = local.s3_replication_enabled ? 1 : 0

source = "../../"

Expand Down

0 comments on commit e6bab0c

Please sign in to comment.