fix: aws_rds_cluster storage_type change cases replacement - #49209
Open
corymhall wants to merge 2 commits into
Open
fix: aws_rds_cluster storage_type change cases replacement#49209corymhall wants to merge 2 commits into
corymhall wants to merge 2 commits into
Conversation
Changing `storage_type` on a non-Aurora Multi-AZ RDS cluster forced a replacement even though AWS supports the change through `ModifyDBCluster`. This PR removes that replacement condition. In addition, when you update the storage_type AWS also makes you send the `AllocatedStorage` and the `Iops` values along with the new `storage_type`. One special case is when you change from `io2` => `gp3` and the allocated storage is below `400` AWS does not allow you to send an Iops value. We handle this by making sure we send a null value instead of the 0 value. fixes hashicorp#48438 **Output from Acceptance Testing** ``` 2026/07/30 07:05:01 Creating Terraform AWS Provider (SDKv2-style)... 2026/07/30 07:05:01 Initializing Terraform AWS Provider (SDKv2-style)... === RUN TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithoutIOPS === PAUSE TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithoutIOPS === CONT TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithoutIOPS --- PASS: TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithoutIOPS (2447.65s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 2453.446s 2026/07/29 15:01:57 Creating Terraform AWS Provider (SDKv2-style)... 2026/07/29 15:01:57 Initializing Terraform AWS Provider (SDKv2-style)... === RUN TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 === PAUSE TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 === RUN TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora === PAUSE TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora === CONT TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 === CONT TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora --- PASS: TestAccRDSCluster_storageTypeAuroraIopt1UpdateAurora (127.41s) --- PASS: TestAccRDSCluster_storageTypeAuroraUpdateAuroraIopt1 (137.86s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 143.819s 2026/07/29 12:55:14 Creating Terraform AWS Provider (SDKv2-style)... 2026/07/29 12:55:14 Initializing Terraform AWS Provider (SDKv2-style)... === RUN TestAccRDSCluster_storageTypeUpdateNonAurora_gp3ToIO2WithDifferentIOPS === PAUSE TestAccRDSCluster_storageTypeUpdateNonAurora_gp3ToIO2WithDifferentIOPS === RUN TestAccRDSCluster_storageTypeUpdateNonAurora_io1ToIO2WithSameIOPS === PAUSE TestAccRDSCluster_storageTypeUpdateNonAurora_io1ToIO2WithSameIOPS === RUN TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithDifferentIOPS === PAUSE TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithDifferentIOPS === CONT TestAccRDSCluster_storageTypeUpdateNonAurora_gp3ToIO2WithDifferentIOPS === CONT TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithDifferentIOPS === CONT TestAccRDSCluster_storageTypeUpdateNonAurora_io1ToIO2WithSameIOPS --- PASS: TestAccRDSCluster_storageTypeUpdateNonAurora_io2ToGP3WithDifferentIOPS (2295.89s) --- PASS: TestAccRDSCluster_storageTypeUpdateNonAurora_gp3ToIO2WithDifferentIOPS (2302.79s) --- PASS: TestAccRDSCluster_storageTypeUpdateNonAurora_io1ToIO2WithSameIOPS (2372.21s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/rds 2378.361s ```
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
Contributor
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
corymhall
added a commit
to pulumi/pulumi-aws
that referenced
this pull request
Jul 30, 2026
## Problem Changing `storage_type` on a non-Aurora Multi-AZ RDS cluster forced a replacement even though AWS supports the change through `ModifyDBCluster`. Removing that replacement condition alone is insufficient because AWS requires the current allocation and IOPS when changing to provisioned IOPS storage or configurable gp3. ## Solution - Carry [hashicorp/terraform-provider-aws#49209](hashicorp/terraform-provider-aws#49209) as patch `0030` to remove the dynamic replacement while preserving Aurora's existing `aurora` normalization. - Send `AllocatedStorage` and `Iops` when the target storage type requires them; omit removed IOPS when changing to gp3 below its configurable threshold. - Add a cached Pulumi provider-upgrade preview from v7.39.0 that asserts the transition produces an update and no replacement. The existing gp3 default-IOPS drift below 400 GiB remains tracked by hashicorp/terraform-provider-aws#41203. ## Validation - `./scripts/upstream.sh check_in` - Live non-Aurora acceptance matrix: io2→gp3 without IOPS, gp3→io2, io1→io2, and io2→gp3 with changed IOPS - Live Aurora compatibility tests for `aurora` ↔ `aurora-iopt1` - `make provider` - `make test_provider` - `TestRegressRDSClusterStorageTypeUpdateNonAurora`: v7.39.0 recording and cached replay Fixes #6554 --------- Co-authored-by: corymhall <43035978+corymhall@users.noreply.github.com>
1 task
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.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
None
Description
Changing
storage_typeon a non-Aurora Multi-AZ RDS cluster forced a replacement even though AWS supports the change throughModifyDBCluster.This PR removes that replacement condition. In addition, when you update the storage_type AWS also makes you send the
AllocatedStorageand theIopsvalues along with the newstorage_type.One special case is when you change from
io2=>gp3and the allocated storage is below400AWS does not allow you to send an Iops value. We handle this by making sure we send a null value instead of the 0 value.Relations
Closes #48438
References
This is built on top of #48545 and adds the additional tests and handling of AllocatedStorage and Iops.
Output from Acceptance Testing