Skip to content

Commit

Permalink
fix: update s3 for label and data for name
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgadgi committed Jul 18, 2023
1 parent 4da6474 commit a2a5a9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _example/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module "s3_logs" {

name = local.bucket_name
environment = local.environment
label_order = ["name"]
label_order = ["name", "environment"]
versioning = true
acl = "log-delivery-write"
bucket_policy = true
Expand Down Expand Up @@ -46,7 +46,7 @@ data "aws_iam_policy_document" "default" {
identifiers = ["cloudtrail.amazonaws.com"]
}
actions = ["s3:GetBucketAcl"]
resources = ["arn:aws:s3:::${local.bucket_name}"]
resources = ["arn:aws:s3:::${module.s3_logs.id}"]
}

statement {
Expand All @@ -57,11 +57,11 @@ data "aws_iam_policy_document" "default" {
identifiers = ["cloudtrail.amazonaws.com"]
}
actions = ["s3:PutObject"]
resources = ["arn:aws:s3:::${local.bucket_name}/AWSLogs/${data.aws_caller_identity.current.account_id}/*"]
resources = ["arn:aws:s3:::${module.s3_logs.id}/AWSLogs/*"]
condition {
test = "StringEquals"
variable = "s3:x-amz-acl"
values = ["bucket-owner-full-control"]
}
}
}
}

0 comments on commit a2a5a9b

Please sign in to comment.