Skip to content

Commit f3792f1

Browse files
Integrated new sam 'log-group-connector' to support auto subscribe log group by tags
1 parent c8e6c3a commit f3792f1

File tree

8 files changed

+39
-29
lines changed

8 files changed

+39
-29
lines changed

aws/cloudwatchlogsforwarder/README.md

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

aws/cloudwatchlogsforwarder/cloudwatchlogsforwarder.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ resource "aws_serverlessapplicationrepository_cloudformation_stack" "auto_enable
196196
DestinationArnType = "Lambda"
197197
DestinationArnValue = aws_lambda_function.logs_lambda_function.arn
198198
LogGroupPattern = var.auto_enable_logs_subscription_options.filter
199+
LogGroupTags = var.auto_enable_logs_subscription_options.tags_filter
199200
UseExistingLogs = local.auto_enable_existing
200201
}
201202
}

aws/cloudwatchlogsforwarder/examples/default/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ module "cloudwatch_logs_lambda_log_forwarder_module" {
2121
}
2222

2323
auto_enable_logs_subscription = "Both"
24-
app_semantic_version = "1.0.11"
24+
app_semantic_version = "1.0.14"
2525
auto_enable_logs_subscription_options = {
2626
filter = "lambda|rds"
27+
tags_filter = ""
2728
}
2829
}
2930

aws/cloudwatchlogsforwarder/variables.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,17 @@ variable "auto_enable_logs_subscription" {
103103
variable "auto_enable_logs_subscription_options" {
104104
type = object({
105105
filter = string
106+
tags_filter = string
106107
})
107108

108109
description = <<EOT
109-
filter - Enter regex for matching logGroups. Regex will check for the name. Visit https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Auto-Subscribe_AWS_Log_Groups_to_a_Lambda_Function#Configuring_parameters
110+
filter - Enter regex for matching logGroups. Regex will check for the name.
111+
tags_filter - Enter comma separated key value pairs for filtering logGroups using tags. Ex KeyName1=string,KeyName2=string. This is optional leave it blank if tag based filtering is not needed.
112+
Visit https://help.sumologic.com/docs/send-data/collect-from-other-data-sources/autosubscribe-arn-destination/#configuringparameters
110113
EOT
111114

112115
default = {
113116
filter = "lambda"
117+
tags_filter = ""
114118
}
115119
}
116-

aws/kinesisfirehoseforlogs/README.md

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

aws/kinesisfirehoseforlogs/examples/default/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ module "kinesis_firehose_for_logs_module" {
2424
}
2525

2626
auto_enable_logs_subscription = "Both"
27-
app_semantic_version = "1.0.11"
27+
app_semantic_version = "1.0.14"
2828
auto_enable_logs_subscription_options = {
2929
filter = "lambda|rds"
30+
tags_filter = ""
3031
}
3132
}

aws/kinesisfirehoseforlogs/kinesisfirehoseforlogs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ resource "aws_serverlessapplicationrepository_cloudformation_stack" "auto_enable
178178
DestinationArnType = "Kinesis"
179179
DestinationArnValue = aws_kinesis_firehose_delivery_stream.logs_delivery_stream.arn
180180
LogGroupPattern = var.auto_enable_logs_subscription_options.filter
181+
LogGroupTags = var.auto_enable_logs_subscription_options.tags_filter
181182
UseExistingLogs = local.auto_enable_existing
182183
RoleArn = aws_iam_role.logs_role.arn
183184
}

aws/kinesisfirehoseforlogs/variables.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,17 @@ variable "auto_enable_logs_subscription" {
8181
variable "auto_enable_logs_subscription_options" {
8282
type = object({
8383
filter = string
84+
tags_filter = string
8485
})
8586

8687
description = <<EOT
87-
filter - Enter regex for matching logGroups. Regex will check for the name. Visit https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Auto-Subscribe_AWS_Log_Groups_to_a_Lambda_Function#Configuring_parameters
88+
filter - Enter regex for matching logGroups. Regex will check for the name.
89+
tags_filter - Enter comma separated key value pairs for filtering logGroups using tags. Ex KeyName1=string,KeyName2=string. This is optional leave it blank if tag based filtering is not needed.
90+
Visit https://help.sumologic.com/docs/send-data/collect-from-other-data-sources/autosubscribe-arn-destination/#configuringparameters
8891
EOT
8992

9093
default = {
9194
filter = "lambda"
95+
tags_filter = ""
9296
}
9397
}
94-

0 commit comments

Comments
 (0)