We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 47d7e36 + f9338c5 commit 70b2759Copy full SHA for 70b2759
data.tf
@@ -6,7 +6,7 @@ data "aws_iam_policy_document" "bucket_policy" {
6
statement {
7
sid = "AllowToPutLoadBalancerLogsToS3Bucket"
8
actions = ["s3:PutObject"]
9
- resources = ["arn:aws:s3:::${var.log_bucket_name}/${var.log_location_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"]
+ resources = ["arn:aws:s3:::${var.log_bucket_name}/${var.log_location_prefix == "" ? "" : format("%s/", var.log_location_prefix)}AWSLogs/${data.aws_caller_identity.current.account_id}/*"]
10
11
principals {
12
type = "AWS"
0 commit comments