Skip to content

Commit

Permalink
refactor ACL config
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Aug 10, 2023
1 parent da73b6e commit 5306a80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ module "openedx_backup" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "~> {{ cookiecutter.terraform_aws_modules_s3 }}"

bucket = var.resource_name_backup
object_ownership = "BucketOwnerPreferred"
acl = "private"
bucket = var.resource_name_backup
acl = "private"
control_object_ownership = true
object_ownership = "ObjectWriter"

tags = merge(
local.tags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ module "openedx_secrets" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "~> {{ cookiecutter.terraform_aws_modules_s3 }}"

bucket = var.resource_name_secrets
object_ownership = "BucketOwnerPreferred"
acl = "private"
bucket = var.resource_name_secrets
acl = "private"
control_object_ownership = true
object_ownership = "ObjectWriter"

tags = merge(
local.tags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@ module "openedx_storage" {
source = "terraform-aws-modules/s3-bucket/aws"
version = "~> {{ cookiecutter.terraform_aws_modules_s3 }}"

bucket = var.resource_name_storage
acl = "private"
bucket = var.resource_name_storage
acl = "private"
control_object_ownership = true
object_ownership = "ObjectWriter"

tags = merge(
local.tags,
{
"cookiecutter/resource/source" = "terraform-aws-modules/s3-bucket/aws"
"cookiecutter/resource/version" = "{{ cookiecutter.terraform_aws_modules_s3 }}"
"cookiecutter/resource/version" = "3.6"
}
)

control_object_ownership = true
object_ownership = "BucketOwnerPreferred"

attach_policy = true
policy = data.aws_iam_policy_document.bucket_policy.json
# attach_policy = true
# policy = data.aws_iam_policy_document.bucket_policy.json

cors_rule = [
{
Expand Down

0 comments on commit 5306a80

Please sign in to comment.