Lambda functions created will only send logs to the cloudwatch group created by the cloudwatch_log_group module if var.function_name is lowercase.
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 58/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- aws
- 領域
- cloud, infrastructure
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- HCL
- 星號
- 36
- 分支
- 44
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
cloudposse/terraform-aws-lambda-function 的其他 Issue
-
Warning: Deprecated attribute可能已有人在做 @arnoldasbrazys 於 403 天前認領。 未關閉bug
難度 1/5 1 小時以內 新手友好度 55/100
cloudposse/terraform-aws-lambda-function#89 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 45/100
cloudposse/terraform-aws-lambda-function#84 · 3 個 reaction ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
cloudposse/terraform-aws-lambda-function#72 · 1 則留言 · 2 個 reaction ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
cloudposse/terraform-aws-lambda-function#62 · 1 則留言 ·
-
bug
難度 1/5 1 小時以內 新手友好度 55/100
cloudposse/terraform-aws-lambda-function#43 · 2 則留言 · 4 個 reaction ·
查看 cloudposse/terraform-aws-lambda-function 的全部 Issue
相似的 Issue
-
api: run samples
難度 2/5 1-3 小時 新手友好度 62/100
GoogleCloudPlatform/python-docs-samples#14633 ·
維護者通常 5 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
apache/iceberg-python#4093 ·
維護者通常 1 天內回覆
-
enhancement exporter/awss3 needs triage
難度 2/5 1-3 小時 新手友好度 66/100
open-telemetry/opentelemetry-collector-contrib#51905 · 1 則留言 ·
維護者通常 1 天內回覆
-
- P2: has workaround pkg: cloudflare triage: fix pending
難度 2/5 1-3 小時 新手友好度 65/100
withastro/astro#18319 · 1 則留言 ·
維護者通常 1 天內回覆
-
@aws-cdk/aws-lambda needs-triage
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆