diff --git a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_backups.tf b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_backups.tf index 1829fcca..47172960 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_backups.tf +++ b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_backups.tf @@ -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, diff --git a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_secrets.tf b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_secrets.tf index d436d8aa..7c6f62a8 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_secrets.tf +++ b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_secrets.tf @@ -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, diff --git a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_storage.tf b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_storage.tf index ca7ad440..3ff5b2f9 100644 --- a/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_storage.tf +++ b/{{cookiecutter.github_repo_name}}/terraform/environments/modules/s3/openedx_storage.tf @@ -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 = [ {