Skip to content

Conversation

@badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented Jan 22, 2026

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

  • Add additionalStorageVolumes property to DatabaseInstance for RDS Oracle and SQL Server
  • Add AdditionalStorageVolume interface
  • Use existing StorageType enum for additional volumes (only GP3 and IO2 are supported, validated at runtime)
  • Volume names are automatically assigned based on array index:
    • rdsdbdata2, rdsdbdata3, rdsdbdata4
  • Add validation for:
    • Engine type (only Oracle and SQL Server supported)
    • Maximum 3 additional volumes
    • Storage type (only GP3 and IO2 supported)
    • Storage size range:
      • Oracle: 200 - 65,536 GiB
      • SQL Server: 20 - 65,536 GiB
    • Throughput/IOPS ratio for GP3 (max 0.25)
    • Storage throughput only applicable for GP3
  • Default IOPS behavior:
    • GP3: No explicit IOPS set by CDK (AWS provides baseline IOPS automatically)
    • IO2: Default 1,000 IOPS if not specified

Describe 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

- 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.
@aws-cdk-automation aws-cdk-automation requested a review from a team January 22, 2026 11:35
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results48 ran48 passed
TestResult
No test annotations available

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates48 ran48 passed
TestResult
No test annotations available

@badmintoncryer badmintoncryer marked this pull request as draft January 22, 2026 11:39
badmintoncryer and others added 3 commits January 22, 2026 20:45
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]>
- 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) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

// 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;
Copy link
Contributor Author

@badmintoncryer badmintoncryer Jan 24, 2026

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(
Copy link
Contributor Author

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().

@badmintoncryer badmintoncryer marked this pull request as ready for review January 26, 2026 15:29
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 27, 2026
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Ty. Some nits.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 31, 2026
@aws-cdk-automation
Copy link
Collaborator

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.

@badmintoncryer
Copy link
Contributor Author

@lpizzinidev Thank you for your review! I'll address your comments later.

@badmintoncryer
Copy link
Contributor Author

@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!

Copy link
Contributor

@lpizzinidev lpizzinidev left a 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 🙃

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants