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

feat: configure log retention in aws-lambda-edge-add-security-headers module #454

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

michaelmcchen
Copy link
Contributor

Summary

Make this parameter configurable for a consuming TF project. Otherwise it defaults to null, which is the equivalent of 0. A 0 day retention policy makes those logs essentially useless.

Test Plan

I think somebody previously made a change in the UI to configure a 30 day retention policy on these logs. Hence, a plan (without this PR) was prompting TF to change the retention policy from 30 to 0 days.

I tested this PR out by running make plan on the consuming TF project and noting that the 30 to 0 day change is no longer prompted.

References

(Optional) Additional links to provide more context.

@michaelmcchen michaelmcchen requested a review from a team as a code owner February 15, 2023 18:13
@michaelmcchen michaelmcchen merged commit 3cf7dc1 into main Feb 15, 2023
@michaelmcchen michaelmcchen deleted the mchen/lambda-security-headers-log-retention branch February 15, 2023 19:24
@palasha
Copy link
Contributor

palasha commented Feb 15, 2023

I think somebody previously made a change in the UI to configure a 30 day retention policy on these logs.

https://github.com/chanzuckerberg/cztack/blob/main/aws-cloudwatch-log-retention-manager/main.tf#L36

It might have been this? I dont know if the null translates into 0 when that script reads the configuration for the log group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants