diff --git a/infrastructure/modules/lambda/README.md b/infrastructure/modules/lambda/README.md index 8e238e7..44c1fdc 100644 --- a/infrastructure/modules/lambda/README.md +++ b/infrastructure/modules/lambda/README.md @@ -46,7 +46,7 @@ | [region](#input\_region) | The AWS Region | `string` | n/a | yes | | [runtime](#input\_runtime) | The runtime to use for the lambda function | `string` | n/a | yes | | [schedule](#input\_schedule) | The fully qualified Cloudwatch Events schedule for when to run the lambda function, e.g. rate(1 day) or a cron() expression. Default disables all events resources | `string` | `""` | no | -| [send\_to\_firehose](#input\_send\_to\_firehose) | Enable sending logs to firehose | `bool` | `false` | no | +| [send\_to\_firehose](#input\_send\_to\_firehose) | Enable sending logs to firehose | `bool` | `true` | no | | [sns\_destination](#input\_sns\_destination) | SNS Topic ARN to be used for on-failure Lambda invocation records | `string` | `null` | no | | [sns\_destination\_kms\_key](#input\_sns\_destination\_kms\_key) | KMS Key ARN to be used for SNS Topic for on-failure Lambda invocation records | `string` | `null` | no | | [system\_log\_level](#input\_system\_log\_level) | The detail level of the Lambda platform event logs sent to CloudWatch | `string` | `"WARN"` | no | diff --git a/infrastructure/modules/lambda/cloudwatch_log_subscription_filter_firehose.tf b/infrastructure/modules/lambda/cloudwatch_log_subscription_filter_firehose.tf index cdf0605..ced23fa 100644 --- a/infrastructure/modules/lambda/cloudwatch_log_subscription_filter_firehose.tf +++ b/infrastructure/modules/lambda/cloudwatch_log_subscription_filter_firehose.tf @@ -1,5 +1,5 @@ resource "aws_cloudwatch_log_subscription_filter" "firehose" { - count = var.send_to_firehose ? 1 : 0 # Keeping this optional for now as don't want to break all lambdas using this, can make this mandatory later + count = var.send_to_firehose ? 1 : 0 name = trim(replace(aws_cloudwatch_log_group.main.name, "/", "-"), "-") log_group_name = aws_cloudwatch_log_group.main.name filter_pattern = var.filter_pattern diff --git a/infrastructure/modules/lambda/variables.tf b/infrastructure/modules/lambda/variables.tf index 1a103c9..33dbe13 100644 --- a/infrastructure/modules/lambda/variables.tf +++ b/infrastructure/modules/lambda/variables.tf @@ -216,7 +216,7 @@ variable "lambda_at_edge" { variable "send_to_firehose" { type = bool description = "Enable sending logs to firehose" - default = false + default = true } variable "filter_pattern" {