Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Deployment permissions are missing, and the logging configuration does not ensure that exported content excludes user data and credentials.
3 open issues
What changed in this PR
Enables DDL statement logging for Aurora PostgreSQL databases through the shared RDS module.
Changes:
- Sets
log_statementtoddlwith immediate application. - Exports PostgreSQL logs to CloudWatch with 30-day retention.
- Creates the log group before enabling cluster exports.
| File | Description |
|---|---|
| infra/modules/rds/rds.tf | Configures DDL logging, CloudWatch export, retention, and resource ordering. |
Review effort: Balanced
Comment on lines
+24
to
+25
| name = "log_statement" | ||
| value = "ddl" |
| #checkov:skip=CKV_AWS_158:The log group is already using the default key, which is sufficient | ||
|
|
||
| # RDS writes to a log group with this exact name when log exports are enabled | ||
| name = "/aws/rds/cluster/aurora-v2-cluster-${var.identifier}/postgresql" |
|
|
||
| enable_http_endpoint = true | ||
|
|
||
| enabled_cloudwatch_logs_exports = ["postgresql"] |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What problem does this pull request solve?
Trello card: https://trello.com/c/nX2BlJtT/3330-enable-logging-for-our-databases
Audit-level logging for schema changes only
Things to consider when reviewing
Reminders
If you've made changes to the deployer role (files in
modules/deployer-access):make <environment> forms/account applyon the relevant environments (dev,stagingand/orprod)apply-forms-terraform-<environment>pipelines have run successfully