Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Handle Lambda@Edge cloud watch shared configuration #36705

Open
npenin opened this issue Apr 3, 2024 · 2 comments
Open

[Enhancement]: Handle Lambda@Edge cloud watch shared configuration #36705

npenin opened this issue Apr 3, 2024 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudfront Issues and PRs that pertain to the cloudfront service. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/lambda Issues and PRs that pertain to the lambda service. service/logs Issues and PRs that pertain to the logs service.

Comments

@npenin
Copy link

npenin commented Apr 3, 2024

Description

When setting up a lambda@edge and we want to customize the cloudwatch, we have to declare the various region the lambda might run in and create as many cloudwatch configurations as regions. This is violating all DRY principle

Affected Resource(s) and/or Data Source(s)

  • aws_lambda_function
  • aws_cloudfront_distribution
  • aws_cloudwatch_log_group

Potential Terraform Configuration

resource aws_cloudwatch_global_log_group "logs"
{
  name              = "/aws/lambda/us-east-1.my-function-name"
  retention_in_days = 5
}

References

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-logs.html

Would you like to implement a fix?

No

@npenin npenin added the enhancement Requests to existing resources that expand the functionality or scope. label Apr 3, 2024
Copy link

github-actions bot commented Apr 3, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/cloudfront Issues and PRs that pertain to the cloudfront service. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/lambda Issues and PRs that pertain to the lambda service. service/logs Issues and PRs that pertain to the logs service. labels Apr 3, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 3, 2024
@npenin
Copy link
Author

npenin commented Apr 3, 2024

another potential way to implement it would be thanks to hashicorp/terraform#24476

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/cloudfront Issues and PRs that pertain to the cloudfront service. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/lambda Issues and PRs that pertain to the lambda service. service/logs Issues and PRs that pertain to the logs service.
Projects
None yet
Development

No branches or pull requests

2 participants