Skip to content

Commit 7e6a62d

Browse files
committed
Create a variable to define the S3 events to trigger the Lambda notifcation AND set the default to ObjectCreated + ObjectRemoved
1 parent f1338b7 commit 7e6a62d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ module "datadog_lambda_forwarder" {
7575
s3_bucket_kms_arns = var.s3_bucket_kms_arns
7676
s3_buckets = var.s3_buckets
7777
s3_buckets_with_prefixes = var.s3_buckets_with_prefixes
78+
s3_notification_events = var.s3_notification_events
7879
security_group_ids = var.security_group_ids
7980
subnet_ids = var.subnet_ids
8081
tracing_config_mode = var.tracing_config_mode

src/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ variable "s3_buckets_with_prefixes" {
100100
default = {}
101101
}
102102

103+
variable "s3_notification_events" {
104+
type = list(string)
105+
description = "List of S3 events to trigger the Lambda notification"
106+
default = ["s3:ObjectCreated:*", "s3:ObjectRemoved:*"]
107+
}
108+
103109
variable "s3_bucket_kms_arns" {
104110
type = list(string)
105111
description = "List of KMS key ARNs for s3 bucket encryption"

0 commit comments

Comments
 (0)