hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.82k stars 9.16k forks source link

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

Open npenin opened 6 months ago

npenin commented 6 months ago

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)

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

github-actions[bot] commented 6 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

npenin commented 6 months ago

another potential way to implement it would be thanks to https://github.com/hashicorp/terraform/issues/24476