Skip to content

BFD-4802: Initial Log alarm creation - #3212

Merged
marshallweekley-eng merged 19 commits into
masterfrom
BFD-4802
Jul 24, 2026
Merged

BFD-4802: Initial Log alarm creation#3212
marshallweekley-eng merged 19 commits into
masterfrom
BFD-4802

Conversation

@marshallweekley-eng

Copy link
Copy Markdown
Contributor

JIRA Ticket:
BFD-4802

What Does This PR Do?

Creates a tofu module to alert if log retention is set below 7 years.

What Should Reviewers Watch For?

Right now we do not have any paired down topic selection. We might want that as we might not care about some log groups.

If you're reviewing this PR, please check for these things in particular:
Assure all permissions are correct

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies
  • Modifies any security controls
  • Adds new transmission or storage of data
  • Any other changes that could possibly affect security?

Only security note is that it does let us know if we do not have proper setup per security/regulatory standards on logs.

  • I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (@sb-benohe) approval.)
  • I have created tests to sufficiently ensure the reliability of my code, if applicable. If this is a modification to an existing piece of code, I have audited the associated tests to ensure everything works as expected.

Validation

Module deploys to AWS

@malessi malessi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks great and is already 90% of the way there, thanks a lot for taking this on! Just a few things to address and I believe we can get this out real soon.

Comment thread ops/services/06-log-retention-alarms/tofu.tf Outdated
Comment thread ops/services/06-log-retention-alarms/lambda_src/.python-version Outdated
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
Comment thread ops/platform/03-log-retention-alarms/log-retention-checker-iam.tf
Comment thread ops/platform/03-log-retention-alarms/log-retention-checker-iam.tf Outdated
Comment thread ops/platform/03-log-retention-alarms/log-retention-checker.tf Outdated
Comment thread ops/platform/03-log-retention-alarms/log-retention-checker.tf
Comment thread ops/platform/03-log-retention-alarms/main.tf

@malessi malessi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more small things!

Comment thread ops/platform/01-config/values/platform.root.sopsw.yaml Outdated
Comment thread ops/platform/01-config/values/platform.non-prod.sopsw.yaml Outdated
Comment thread ops/platform/01-config/values/platform.prod.sopsw.yaml Outdated
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
Comment thread ops/platform/03-log-retention-alarms/main.tf Outdated
Comment thread ops/platform/03-log-retention-alarms/main.tf
Comment thread ops/platform/03-log-retention-alarms/lambda_src/pyproject.toml Outdated
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
marshallweekley-eng and others added 2 commits July 22, 2026 06:57
Co-authored-by: Mitchell Alessio <5306896+malessi@users.noreply.github.com>

@malessi malessi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few very small nitpicks and I feel like this'll be ready to go.

Comment thread ops/platform/root.tofu.tf
Comment thread ops/platform/03-log-retention-alarms/main.tf
Comment thread ops/platform/03-log-retention-alarms/lambda_src/log_retention_checker.py Outdated
@malessi
malessi self-requested a review July 23, 2026 20:14

@malessi malessi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks for working through the review comments so quickly 🙂

@marshallweekley-eng
marshallweekley-eng added this pull request to the merge queue Jul 24, 2026
Merged via the queue into master with commit fe09f3a Jul 24, 2026
10 checks passed
@marshallweekley-eng
marshallweekley-eng deleted the BFD-4802 branch July 24, 2026 15:26
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.

3 participants