Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Lambda functions created will only send logs to the cloudwatch group created by the cloudwatch_log_group module if var.function_name is lowercase.

Ouverte
#95 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
58/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
aws

Piste de recherche

Start with main.tf and the cloudwatch_log_group module, then inspect cloudposse/terraform-null-label/variables.tf to trace how function_name casing reaches both resources. Reproduce with a mixed-case function_name and compare the Lambda and CloudWatch log group names. Done means the names follow the same casing convention, or the inputs documentation clearly states the lowercase requirement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug
Describe the Bug

The cloudwatch log group created with the cloudwatch_log_group module will only match the name of lambda function if var.function_name is lowercase. For example, if var.function_name is Prod-FooBar then the name of the cloudwatch log group created will be /aws/lambda/prod-foobar.

AWS automatically creates cloudwatch log groups based on the name of the lambda function, so once Prod-FooBar is invoked for the first time yet another (non-terraform managed) cloudwatch log group is created called /aws/lambda/Prod-Foobar with default settings.

Expected Behavior

The cloudwatch log group created with the cloudwatch_log_group module follows the same casing conventions as the lambda function name, so if var.function_name is 'Prod-FooBar' then the aws_cloudwatch_log_group created should have the name /aws/lambda/Prod-FooBar

Steps to Reproduce

Set function_name to a string that contains a mix of capital and lowercase letters.

Screenshots

No response

Environment

Module version: 0.6.1
Terraform: 1.11.3

Additional Context

If this is the intended behavior of this module, and users are meant to either pass in a lowercase string for function_name or edit the cloudposse/terraform-null-label/variables.tf, then the inputs documentation should be updated to reflect this.

If not, then the cloudwatch log group created by this module should ALWAYS follow the /aws/lambda/<function name> convention or the log_group should be defined in a logging_config block.

Since the aws_lambda_function block defined in main.tf already depends_on the cloudwatch_log_group module block, setting the function_name of that block to cloudwatch_log_group.outputs.log_group_name would guarantee that the name of the lambda and the log group match, but that would require anyone wanting to use something other than the default lowercase conventions to copy and edit the contents of cloudposse/terraform-null-label/variables.tf.

Langage dominant
HCL
Étoiles
36
Forks
44
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cloudposse/terraform-aws-lambda-function

Toutes les issues de cloudposse/terraform-aws-lambda-function

Issues similaires

Plus d'issues Cloud

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.