-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(rds): add support for additional storage volumes in RDS instances #36769
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
base: main
Are you sure you want to change the base?
Conversation
- Introduced AdditionalStorageVolume and AdditionalStorageVolumeType enums to define additional storage configurations. - Updated DatabaseInstance to accept additional storage volumes for Oracle and SQL Server engines. - Implemented validation for additional storage volumes, including constraints on IOPS, storage types, and maximum volume limits. - Added integration tests to verify functionality and constraints for additional storage volumes. - Enhanced README documentation to include details on additional storage volumes and usage examples.
|
|
||||||||||||||
|
|
||||||||||||||
Volume names are now consistently rdsdbdata2/3/4 for both engines. For SQL Server, these are automatically mapped to drive letters H:\, I:\, J:\. Co-Authored-By: Claude Opus 4.5 <[email protected]>
…rageVolumes function
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Implemented validation for storage throughput constraints for GP3 based on engine type (Oracle and SQL Server). - Added validation for IOPS constraints for IO2 storage. - Updated unit tests to cover new validation rules for additional storage volumes, including boundary value tests for allocated storage, GP3 IOPS, and throughput.
- Implemented validation for storage throughput constraints for GP3 based on engine type (Oracle and SQL Server). - Added validation for IOPS constraints for IO2 storage. - Updated unit tests to cover new validation rules for additional storage volumes, including boundary value tests for allocated storage, GP3 IOPS, and throughput.
| const volumeStorageType = volume.storageType ?? AdditionalStorageVolumeType.GP3; | ||
|
|
||
| // Validate storageThroughput is only for GP3 | ||
| if (volume.storageThroughput && volumeStorageType !== AdditionalStorageVolumeType.GP3) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reguration is described in here.
https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_AdditionalStorageVolume.html
| // Oracle: minimum 200 GiB, SQL Server: minimum 20 GiB (same as D: drive limit) | ||
| if (!volume.allocatedStorage.isUnresolved()) { | ||
| const allocatedStorageGiB = volume.allocatedStorage.toGibibytes(); | ||
| const minStorage = engineType.startsWith('oracle-') ? 200 : 20; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minimum storage value is described in here(AllocatedStorage section) and Oracle is 200 GiB.
Maximum storage value is 64TiB.
https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_AdditionalStorageVolume.html
| const storageThroughputMiBps = volume.storageThroughput?.isUnresolved() | ||
| ? undefined | ||
| : volume.storageThroughput?.toMebibytes(); | ||
| validateStorageThroughput( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Execute the same validation on the primary storage using validateStorageThroughput().
lpizzinidev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty. Some nits.
|
This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state. |
|
@lpizzinidev Thank you for your review! I'll address your comments later. |
|
@lpizzinidev Your comments are exactly right. I've addressed all of them. It was great to have you review again after such a long time! |
lpizzinidev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ty. Have been a bit busy recently 🙃
Issue # (if applicable)
None
Reason for this change
AWS RDS supports additional storage volumes for Oracle and SQL Server instances, allowing up to 256 TiB of total storage across multiple volumes. This feature was not available in the L2 construct.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.ModifyingExisting.AdditionalVolumes.html
Description of changes
additionalStorageVolumesproperty toDatabaseInstancefor RDS Oracle and SQL ServerAdditionalStorageVolumeinterfaceStorageTypeenum for additional volumes (onlyGP3andIO2are supported, validated at runtime)rdsdbdata2,rdsdbdata3,rdsdbdata4Describe any new or updated permissions being added
N/A
Description of how you validated changes
Add both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license