Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ resource "aws_s3_bucket_public_access_block" "origin" {
block_public_policy = var.block_origin_public_access_enabled
restrict_public_buckets = var.block_origin_public_access_enabled

# Always block ACL access. We're using policies instead
block_public_acls = true
ignore_public_acls = true
# We block ACL access by default and use policies instead
block_public_acls = var.block_public_acls
ignore_public_acls = var.ignore_public_acls
}

resource "aws_s3_bucket_ownership_controls" "origin" {
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,18 @@ variable "block_origin_public_access_enabled" {
description = "When set to 'true' the s3 origin bucket will have public access block enabled"
}

variable "block_public_acls" {
type = bool
default = true
description = "When set to 'false' s3 origin bucket allows public_acls"
}

variable "ignore_public_acls" {
type = bool
default = true
description = "When set to 'false' s3 origin bucket considers public_acls"
}

variable "s3_access_logging_enabled" {
type = bool
default = null
Expand Down