Skip to content

Commit

Permalink
Change default acl value
Browse files Browse the repository at this point in the history
  • Loading branch information
jsclarridge committed May 23, 2023
1 parent c2de226 commit 6bcc7d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ No modules.
| noncurrent\_version\_retention | Number of days to retain non-current versions of objects if versioning is enabled. | `string` | `30` | no |
| object\_ownership | Object ownership. Valid values: BucketOwnerEnforced, BucketOwnerPreferred or ObjectWriter. | `string` | `"BucketOwnerEnforced"` | no |
| redshift\_logs\_prefix | S3 prefix for RedShift logs. | `string` | `"redshift"` | no |
| s3\_bucket\_acl | Set bucket ACL per [AWS S3 Canned ACL](<https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl>) list. | `string` | `"log-delivery-write"` | no |
| s3\_bucket\_acl | Set bucket ACL per [AWS S3 Canned ACL](<https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl>) list. | `string` | `null` | no |
| s3\_bucket\_name | S3 bucket to store AWS logs in. | `string` | n/a | yes |
| s3\_log\_bucket\_retention | Number of days to keep AWS logs around. | `string` | `90` | no |
| s3\_logs\_prefix | S3 prefix for S3 access logs. | `string` | `"s3"` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ resource "aws_s3_bucket_policy" "aws_logs" {
}

resource "aws_s3_bucket_acl" "aws_logs" {
count = var.s3_bucket_acl != null ? 1 : 0
bucket = aws_s3_bucket.aws_logs.id
acl = var.s3_bucket_acl
depends_on = [aws_s3_bucket_ownership_controls.aws_logs]
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "noncurrent_version_retention" {

variable "s3_bucket_acl" {
description = "Set bucket ACL per [AWS S3 Canned ACL](<https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl>) list."
default = "log-delivery-write"
default = null
type = string
}

Expand Down

0 comments on commit 6bcc7d1

Please sign in to comment.