feat: add cloudwatch_logs_log_group_name variable for log group name override#92
Open
supersidor wants to merge 1 commit intocloudposse:mainfrom
Open
Conversation
…verride
The CloudWatch log group name was hardcoded as /aws/lambda/{function_name}
and lowercased by null-label's default label_value_case. This prevented
importing existing log groups with mixed-case names. When the new variable
is set, label_value_case=none preserves the exact name provided.
Refs: CE-62455
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE:
I am working in Life360, cant create PR using my Github enterprise userAdds a new cloudwatch_logs_log_group_name variable that allows overriding the default CloudWatch log group name (/aws/lambda/{function_name}).
This is needed when migrating legacy Terraform configurations to Atmos, where existing Lambda functions may already have CloudWatch log groups with non-standard names. Without this override, the module would
try to recreate the log group with the default naming convention, causing resource conflicts or unnecessary destroy/create cycles during migration.
Changes
Usage
module "lambda" {
source = "cloudposse/lambda-function/aws"
}
When cloudwatch_logs_log_group_name is not set (default null), behavior is unchanged — the log group defaults to /aws/lambda/{function_name}.