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.
ListBucket
1 parent 6a88a8e commit 711ca6eCopy full SHA for 711ca6e
modules/log_forwarder/main.tf
@@ -208,7 +208,7 @@ resource "aws_lambda_permission" "cloudwatch" {
208
}
209
210
resource "aws_lambda_permission" "s3" {
211
- count = var.create ? 1 : 0
+ count = var.create && length(var.s3_log_bucket_arns) > 0 ? 1 : 0
212
213
statement_id = "datadog-forwarder-S3Permission"
214
action = "lambda:InvokeFunction"
modules/log_forwarder/policy.tmpl
@@ -18,7 +18,8 @@
18
"Action": [
19
"s3:GetObject",
20
"s3:PutObject",
21
- "s3:DeleteObject"
+ "s3:DeleteObject",
22
+ "s3:ListBucket"
23
],
24
"Effect": "Allow",
25
"Resource": [
0 commit comments