Skip to content

Commit

Permalink
fix: 🐛 Remove State Farm specific Lambda reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Clete2 committed Jun 19, 2023
1 parent 61a1fb4 commit 445c260
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
20 changes: 0 additions & 20 deletions tf-cloudwatch-logs.tf
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
data "aws_lambda_function" "datadog" {
function_name = "sf-datadog-lambda-forwarder"
}

resource "aws_cloudwatch_log_group" "log_retention_lambda" {
name = "/aws/lambda/${local.log_retention_lambda_name}"
retention_in_days = 30
tags = var.tags
}

resource "aws_cloudwatch_log_subscription_filter" "log_retention_lambda_datadog" {
count = var.enable_datadog_log_subscription ? 1 : 0
name = "default"
destination_arn = data.aws_lambda_function.datadog.arn
log_group_name = aws_cloudwatch_log_group.log_retention_lambda.name
filter_pattern = ""
}

resource "aws_cloudwatch_log_group" "global_log_retention_lambda" {
name = "/aws/lambda/${local.global_log_retention_lambda_name}"
retention_in_days = 30
tags = var.tags
}

resource "aws_cloudwatch_log_subscription_filter" "global_log_retention_lambda_datadog" {
count = var.enable_datadog_log_subscription ? 1 : 0
name = "default"
destination_arn = data.aws_lambda_function.datadog.arn
log_group_name = aws_cloudwatch_log_group.global_log_retention_lambda.name
filter_pattern = ""
}
6 changes: 0 additions & 6 deletions tf-inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ variable "log_level" {
description = "Override Lambda log level (trace/debug/info/warn/error)"
}

variable "enable_datadog_log_subscription" {
type = bool
default = true
description = "Subscribes the logs from the Lambda to Datadog"
}

variable "log_retention_in_days" {
type = number
default = 90
Expand Down

0 comments on commit 445c260

Please sign in to comment.