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

add input var s3_object_ownership #63

Closed
wants to merge 5 commits into from
Closed
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
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module "access_log_label" {

module "s3_bucket" {
source = "cloudposse/s3-log-storage/aws"
version = "0.26.0"
version = "0.28.0"
enabled = module.this.enabled

acl = var.acl
Expand Down Expand Up @@ -38,13 +38,13 @@ module "s3_bucket" {
bucket_notifications_enabled = var.bucket_notifications_enabled
bucket_notifications_type = var.bucket_notifications_type
bucket_notifications_prefix = var.bucket_notifications_prefix

s3_object_ownership = var.s3_object_ownership
context = module.this.context
}

module "s3_access_log_bucket" {
source = "cloudposse/s3-log-storage/aws"
version = "0.26.0"
version = "1.0.0"
enabled = module.this.enabled && var.create_access_log_bucket

acl = var.acl
Expand Down Expand Up @@ -76,7 +76,7 @@ module "s3_access_log_bucket" {

data "aws_iam_policy_document" "default" {
count = module.this.enabled ? 1 : 0
source_json = var.policy == "" ? null : var.policy
source_policy_documents = [var.policy]

statement {
sid = "AWSCloudTrailAclCheck"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,10 @@ variable "bucket_notifications_prefix" {
type = string
description = "Prefix filter. Used to manage object notifications"
default = ""
}

variable "s3_object_ownership" {
type = string
default = "BucketOwnerPreferred"
description = "Specifies the S3 object ownership control. Valid values are `ObjectWriter`, `BucketOwnerPreferred`, and 'BucketOwnerEnforced'."
}