You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using terraform-aws-lambda-function to create a lambda and associated log group, the resulting log groups can in some cases not match the function name, which results in no logs being sent to the created group.
Expected Behavior
I create a lambda using the terraform-aws-lambda-function module, and the name of this lambda contains an underscore
The resultant log group created by this module should be called /aws/lambda/my_function_name.
Instead the log group created is called /aws/lambda/myfunctionname, as the label for the log group contains a regex_replace_chars rule that does not allow for underscores.
This means the AWS creates its own log group (with default config like no expiration) for the lambda, and the log group created by this module is orphaned.
Invoke the lambda module with var.function_name set to a value that includes an underscore.
Screenshots
Environment
v0.6.6 -- version of the module used in the lambda module -- IS AFFECTED
v0.6.8 -- current version of the module -- IS AFFECTED
Additional Context
This fix requires a bump to the version of the cloudwatch logs module used in the lambda module (and/or anywhere else in the CloudPosse module/component libraries that support the creation of resources with underscores in their names.
The text was updated successfully, but these errors were encountered:
Describe the Bug
When using terraform-aws-lambda-function to create a lambda and associated log group, the resulting log groups can in some cases not match the function name, which results in no logs being sent to the created group.
Expected Behavior
I create a lambda using the terraform-aws-lambda-function module, and the name of this lambda contains an underscore
The resultant log group created by this module should be called
/aws/lambda/my_function_name
.Instead the log group created is called
/aws/lambda/myfunctionname
, as the label for the log group contains aregex_replace_chars
rule that does not allow for underscores.This means the AWS creates its own log group (with default config like no expiration) for the lambda, and the log group created by this module is orphaned.
https://github.com/cloudposse/terraform-aws-cloudwatch-logs/blob/f622326cce042d0e49b2613cc994ab710355ac7f/main.tf#L5C1-L13C2
Steps to Reproduce
Invoke the lambda module with
var.function_name
set to a value that includes an underscore.Screenshots
Environment
v0.6.6 -- version of the module used in the lambda module -- IS AFFECTED
v0.6.8 -- current version of the module -- IS AFFECTED
Additional Context
This fix requires a bump to the version of the cloudwatch logs module used in the lambda module (and/or anywhere else in the CloudPosse module/component libraries that support the creation of resources with underscores in their names.
The text was updated successfully, but these errors were encountered: