Skip to content

Commit 5cd0cf2

Browse files
committed
always enforce object ownership in s3 buckets
1 parent 620909c commit 5cd0cf2

2 files changed

Lines changed: 0 additions & 8 deletions

File tree

terraform/shared-modules/s3/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ resource "aws_s3_bucket_policy" "bucket_policy" {
178178
}
179179

180180
resource "aws_s3_bucket_ownership_controls" "owner" {
181-
count = var.enforce_bucket_object_ownership ? 1 : 0
182181
bucket = aws_s3_bucket.this.id
183182
rule {
184183
object_ownership = "BucketOwnerEnforced"

terraform/shared-modules/s3/variables.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ variable "name" {
1414
}
1515
}
1616

17-
variable "enforce_bucket_object_ownership" {
18-
type = bool
19-
description = "Whether S3 bucket object ownership should be enforced to the bucket owner"
20-
default = true
21-
nullable = false
22-
}
23-
2417
variable "extra_bucket_policies" {
2518
type = list(string)
2619
description = "Extra bucket policies to apply to this bucket. List of json policies"

0 commit comments

Comments
 (0)