Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module "cloudwatch_log_group" {
iam_role_enabled = false
kms_key_arn = var.cloudwatch_logs_kms_key_arn
retention_in_days = var.cloudwatch_logs_retention_in_days
name = "/aws/lambda/${var.function_name}"
name = coalesce(var.cloudwatch_logs_log_group_name, "/aws/lambda/${var.function_name}")
label_value_case = var.cloudwatch_logs_log_group_name != null ? "none" : null
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious what the rationale is for this addition? We don't typically pass this

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am closing this PR, was mistake from my part


tags = module.this.tags
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ variable "cloudwatch_logs_kms_key_arn" {
default = null
}

variable "cloudwatch_logs_log_group_name" {
type = string
description = "Explicit CloudWatch log group name. If null, defaults to /aws/lambda/{function_name}."
default = null
}

variable "description" {
type = string
description = "Description of what the Lambda Function does."
Expand Down