Open elruwen opened 6 months ago
Hey @elruwen, thanks for contributing. Sorry for taking so long.
I think if we were to do this change, without adding the V2
it would require us to do a breaking change. Let me get back to you on what our best option is, but I guess we'll just add your change without the suffix and make it breaking.
I think it would be ideal to have the policy as a conditional, if the log group already exists, then don't create it. That way we can ensure that there are no breaking changes, what do you think about this?
Sounds good, let me give that a try
Hey @elruwen,
Let me know if you get to an alternative, I tried but fail multiple times. I'm afraid we might have to end up adding a breaking change at the end 😅
Before this change, the copy lambda creates a log group which never expires. When you manage lots of AWS accounts and you want to make sure that all cloudwatch log groups expire at some point, this can get very annoying.
I renamed the logical id of the function, so that a new function is created and therefore we get a chance to create the log group. Otherwise the stack would fail since there would be already an existing log group.
What does this PR do?
Expire the log group of the copy function.
Motivation
We centrally running analysis to make sure that all cloud watch log groups have an expiry set. This one always sticks out. That is annoying.
Testing Guidelines
I deployed the stack to avoid timing issues.
Additional Notes
Types of changes
Check all that apply