aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.51k stars 3.85k forks source link

(aws_docdb): (Propogate maintenace window settings to cluster's instances) #30391

Open nritholtz opened 3 months ago

nritholtz commented 3 months ago

Describe the feature

Currently if you specified a preferredMaintenanceWindow on a cdk.aws_docdb.DatabaseCluster construct, it will only apply it to the cluster level. See https://github.com/aws/aws-cdk/blob/8b234b71f2bbfec8ceca4e062674290eb51c8c9b/packages/aws-cdk-lib/aws-docdb/lib/cluster.ts#L570. Add support for instance's window as well.

Use Case

This is creating unexpected maintenance events when you declared the window at the cluster level, and assumed instances would follow suit.

Proposed Solution

We should allow if you specify preferredMaintenanceWindow on cluster level, it should apply to instances as well.

Other Information

No response

Acknowledgements

CDK version used

2.142.1

Environment details (OS name and version, etc.)

Mac 13.5.2

khushail commented 3 months ago

Hey @nritholtz , thanks for submitting this FR. I am not sure how this should be implemented as by passing it to instanceprops or creating a flag, however suggestions and contributions are welcome from the community!