Skip to content

Commit

Permalink
fix: replication depends on versioning
Browse files Browse the repository at this point in the history
`aws_s3_bucket_versioning` can't be destroyed when
`aws_s3_bucket_replication_configuration` exists.
  • Loading branch information
nozaq committed Mar 5, 2022
1 parent f5dbdaf commit cbb1173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,8 @@ resource "aws_s3_bucket_replication_configuration" "state" {
}
}
}

# Versioning can't be disabled when the replication configuration exists.
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication-and-other-bucket-configs.html#replication-and-versioning
depends_on = [aws_s3_bucket_versioning.state]
}

0 comments on commit cbb1173

Please sign in to comment.