feat(docdb): support per-instance maintenance window on DatabaseCluster#38315
feat(docdb): support per-instance maintenance window on DatabaseCluster#38315gudipati wants to merge 1 commit into
Conversation
| * occurring on a random day of the week. | ||
| * @see https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-maintain.html#maintenance-window | ||
| */ | ||
| readonly instanceMaintenanceWindow?: string; |
There was a problem hiding this comment.
Can we make this more ergonomic, along the lines of the various Schedules we have across the codebase? So the user can declare a window like MaintenanceWindow.startingAt('tue:04:17') or something like that?
There was a problem hiding this comment.
Although something like MaintenanceWindow might be more ergonomic, I think it might be better to keep it consistent with preferredMaintenanceWindow (cluster maintenance window) in docdb and maintenance window implemented in RDS. What are your thoughts ?
There was a problem hiding this comment.
Hmm yes, it would be inconsistent, unless we deprecated preferredMaintenanceWindow and created a more type safe one. But that's a bigger lift, and probably not worth it. But can we at least validate that the string matches the expected pattern?
Issue # (if applicable)
Closes #30391.
Reason for this change
Docdb
DatabaseClusteronly forwardspreferredMaintenanceWindowto the underlying cluster resource. The auto-created instance resources never receive a maintenance window, so by default a random 30-minute window is selected per instance, causing surprise maintenance events outside the user's chosen window. Adding support for users to provide specific maintenance window for instances created in the cluster.Description of changes
Adds a new optional
instanceMaintenanceWindowproperty toDatabaseCluster. When set, every auto-created instance is assigned that value as itsPreferredMaintenanceWindow. The cluster-levelpreferredMaintenanceWindowis unchanged and continues to apply only to the cluster.Describe any new or updated permissions being added
N/A — no IAM or other permission changes.
Description of how you validated changes
Unit tests and Integration tests succeeded
Checklist