diff --git a/_data.tf b/_data.tf deleted file mode 100644 index 7a94467..0000000 --- a/_data.tf +++ /dev/null @@ -1,3 +0,0 @@ -data "aws_cloudwatch_log_group" "cloudtrail" { - name = var.cloudtrail_log_group_name -} diff --git a/alarms.tf b/alarms.tf index 3adda66..6c8ff94 100644 --- a/alarms.tf +++ b/alarms.tf @@ -94,7 +94,7 @@ resource "aws_cloudformation_stack" "cloudtrail_alarm" { template_body = var.alarm_mode == "full" ? file("${path.module}/cloudtrail-alarms-full.cf.json") : file("${path.module}/cloudtrail-alarms-light.cf.yml") parameters = { - CloudTrailLogGroupName = data.aws_cloudwatch_log_group.cloudtrail.name + CloudTrailLogGroupName = var.cloudtrail_log_group_name AlarmNotificationTopic = aws_sns_topic.alarms[0].id } } diff --git a/main.tf b/main.tf index d2e40c4..ccf7a2d 100644 --- a/main.tf +++ b/main.tf @@ -9,7 +9,7 @@ resource "aws_lambda_function" "lambda" { tags = var.tags environment { variables = { - LOG_GROUP = data.aws_cloudwatch_log_group.cloudtrail.name, + LOG_GROUP = var.cloudtrail_log_group_name, TOPIC_ARN= aws_sns_topic.alarms[0].arn, OFFSET=180 }