Skip to content

Commit a6bd054

Browse files
milenpankov-boschmveitas
authored andcommitted
feat(lambda-promtail): Add terraform variable for s3 bucket notification filter prefix (grafana#15381)
Exposes the filter_prefix in the lambda_function of the aws_s3_bucket_notification resource as a terraform variable.
1 parent abd2aa8 commit a6bd054

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tools/lambda-promtail/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ resource "aws_s3_bucket_notification" "this" {
281281
lambda_function {
282282
lambda_function_arn = aws_lambda_function.this.arn
283283
events = ["s3:ObjectCreated:*"]
284-
filter_prefix = "AWSLogs/"
284+
filter_prefix = var.filter_prefix
285285
filter_suffix = var.filter_suffix
286286
}
287287

tools/lambda-promtail/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ variable "bucket_names" {
1616
default = []
1717
}
1818

19+
variable "filter_prefix" {
20+
type = string
21+
description = "Prefix for S3 bucket notification filter"
22+
default = "AWSLogs/"
23+
}
24+
1925
variable "filter_suffix" {
2026
type = string
2127
description = "Suffix for S3 bucket notification filter"

0 commit comments

Comments
 (0)