Skip to content

Commit

Permalink
fix logging prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashle001 committed Sep 24, 2020
1 parent 70aa3c6 commit 712b61d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ resource "aws_s3_bucket" "this" {

logging {
target_bucket = var.access_log_bucket
target_prefix = format("%s/%s/", var.access_log_bucket_prefix, var.access_log_bucket)
target_prefix = format("%s/%s/", var.access_log_bucket_prefix, var.bucket_name)
#target_prefix = format("%s/%s/", var.access_log_bucket_prefix, var.access_log_bucket)
}

lifecycle {
Expand Down Expand Up @@ -99,9 +100,11 @@ data "aws_iam_policy_document" "this" {
}
statement {
sid = "enforceSSL"
effe = "Deny"
principals = "*"
actions = "s3:*"
effect = "Deny"
actions = ["s3:*"]
principals {
type = "AWS"
identifiers = ["*"]
resources = [aws_s3_bucket.this.arn, "${aws_s3_bucket.this.arn}/*"]
condition {
test = "Bool"
Expand Down Expand Up @@ -180,4 +183,4 @@ resource "aws_kms_alias" "key" {
name = "alias/${local.kms_key_name}"
target_key_id = aws_kms_key.key.key_id
}

}

0 comments on commit 712b61d

Please sign in to comment.