Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: added ability to set the attributes block_public_acls and ig… #323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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 @@ -334,9 +334,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 @@ -526,6 +526,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