Skip to content

Commit

Permalink
fix target_prefix variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ashle001 committed Jul 29, 2020
1 parent 613efa2 commit e53f325
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "aws_s3_bucket" "this" {

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

lifecycle {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ variable "tags" {
type = map(string)
default = { }
}

variable "access_log_bucket_prefix" {
description = "Access log bucket prefix, to which the bucket name will be appended to make the target_prefix"
type = string
default = "s3"
}

0 comments on commit e53f325

Please sign in to comment.