Skip to content

Commit

Permalink
fix: crash when replication is disabled (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
nozaq authored Apr 28, 2023
1 parent 42f63c6 commit 30a9e9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ resource "aws_s3_bucket" "replica" {
}

resource "aws_s3_bucket_ownership_controls" "replica" {
bucket = aws_s3_bucket.replica[0].id
count = var.enable_replication ? 1 : 0
provider = aws.replica

bucket = aws_s3_bucket.replica[0].id

rule {
object_ownership = "BucketOwnerPreferred"
}
Expand Down

0 comments on commit 30a9e9f

Please sign in to comment.