Skip to content

Commit 5a8efb7

Browse files
committed
CCM-12770: Splunk log sending mandatory
1 parent dd91a50 commit 5a8efb7

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

infrastructure/modules/lambda/cloudwatch_log_subscription_filter_firehose.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
resource "aws_cloudwatch_log_subscription_filter" "firehose" {
2+
count = var.send_to_firehose ? 1 : 0
23
name = trim(replace(aws_cloudwatch_log_group.main.name, "/", "-"), "-")
34
log_group_name = aws_cloudwatch_log_group.main.name
45
filter_pattern = var.filter_pattern

infrastructure/modules/lambda/variables.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,12 @@ variable "lambda_at_edge" {
213213
default = false
214214
}
215215

216+
variable "send_to_firehose" {
217+
type = bool
218+
description = "Enable sending logs to firehose"
219+
default = true
220+
}
221+
216222
variable "filter_pattern" {
217223
type = string
218224
description = "Filter pattern to use for the log subscription filter"
@@ -222,11 +228,13 @@ variable "filter_pattern" {
222228
variable "log_destination_arn" {
223229
type = string
224230
description = "Destination ARN to use for the log subscription filter"
231+
default = ""
225232
}
226233

227234
variable "log_subscription_role_arn" {
228235
type = string
229236
description = "The ARN of the IAM role to use for the log subscription filter"
237+
default = ""
230238
}
231239

232240
variable "permission_statements" {

0 commit comments

Comments
 (0)