-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Creating very large database causes Error: error modifying DB Instance (orders-replica-7-p): InvalidParameterCombination: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops. #12493
Comments
I was able to reproduce the bug with an acceptance test:
I will propose a fix in the next couple days. I'm thinking of making IOPS a variable that goes in both creation and modify steps. The issue is as the error describes, the modify call MUST have the Iops passed for a DB that has IOPS set. DB size doesn't affect the bug. |
Small update. My first fix was to pass the iops to the modify step as well during the creation, which solved that error. I've been adding a few more cases, one that tests a different allocated_storage in the replica compared to the source. I get the following error:
The explanation for this is what @muffy was already mentioning about the I'm leaning towards 2/ as it will be the most consistent in the code and that way there would be no change in behavior for the module. The wait for |
I agree, it's most consistent to wait for |
One more observation.
So 1 is back! I'm RDS' detective pikachu at this point :) |
Just wanted to share what I observed: this bug manifested when passing explicit |
We're still running into this on the |
This problem is most annoying when trying to increase the RDS storage size over time. If you have a primary and a replica, and you up the storage size on the primary and do a
so the only workaround I've been able to come up with besides completely replacing the replica is to NOT specify the allocated storage for the replica and use the AWS CLI to update the storage size of the replica once you do it once the terraform state did not seem to complain. EDIT: this seems like the same issue but more with primary vs. replica relationship. I can open a separate ticket if needed to track this. |
Ignore allocated storage while creating a Read Replica * Fixes Issue #12493 Tests: * The acceptance test (allocatedStorageAndIops that would be previously failing), shows the bug by setting up a Replica DB with both IOPS and Allocated storage. * Also Added an acceptance test for Iops modification to confirm code is ok because of the returned error message in the issue. Didn't show failures previously. Fix: * Ignore allocated storage when creating a read replica as this value cannot be different from the primary. * Update doc to reflect param handling difference.
@bminahan-kc it sounds like the same issue. The Fix is merged and you should be able to pick it up on the next release, if that didn't fix it, feel free to open a new issue. |
Hey all 👋 It looks like the fix for this was merged in with #12548 and was released with the |
I have this issue under version 3.61.0.
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
We use very large RDS PostgreSQL instances that typically take up to two hours to create in AWS. After the apply/DB create runs for a couple of hours we get the error:
Looking in CloudTrail we see that there is indeed a modify DB instance request that has allocated storage and not IOPS:
Since the DB is being created, it should not require modification. The DB moves from
creating
tostorage-optimization
, which will also take several hours, so even if an update were necessary, it would not be possible to update the allocated storage at this time. Also, the AWS docs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) say: "You can't modify allocated storage if the DB instance status is storage-optimization or if the allocated storage for the DB instance has been modified in the last six hours." so the provider should not try to make a call to update allocated storage at all. If it does, though, it should always include IOPS even if they have not changed.The plan for the db is as follows:
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: