terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
886 stars 656 forks source link

feat!: Added advanced logging configuration. Bump version of AWS provider to 5.32 #531

Closed JoshuaLicense closed 5 months ago

JoshuaLicense commented 5 months ago

Description

Adds logging_config block for enabling advanced logging.

Motivation and Context

Closes #530

Breaking Changes

No

How Has This Been Tested?

JoshuaLicense commented 5 months ago

Could you please update this module and handle the cases when the user specifies custom log group then default log group should not be created?

Maybe there are other cases that should be considered. I would appreciate if you can think about this and update this PR.

My bad, thanks for the review. I've pushed some tweaks that handle the different log group scenarios better. use_existing_cloudwatch_log_group logging_log_group aws_cloudwatch_log_group created
true null ❌ retrieved from data source: "/aws/lambda/${var.lambda_at_edge ? "us-east-1." : ""}${var.function_name}"
true populated ❌ retrieved from data source: var.logging_log_group
false null βœ…
false populated ❌ retrieved from data source: var.logging_log_group

Also, maybe we need to update the log group in the outputs of the module if user specifies custom log group.

Existing data source is re-used so outputs should update appropriately.

antonbabenko commented 5 months ago

This PR is included in version 7.0.0 :tada:

AndrewCharlesHay commented 5 months ago

This causes breaks in Gov Cloud see #539

github-actions[bot] commented 4 months ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.