-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: After switching an RDS instance from gp2 to gp3, following apply will fail if IOPS is not specified #28271
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
@etiennechabert Thanks for raising this issue. |
@ewbankkit during the first apply, the one that succeeded initially, switching my instance from gp2 to gp3, my terraform configuration was not specifying anything for IOPS... but I realize now that the module we are using is setting
First apply
Following appliesDuring the following apply, the ones that failed, my terraform configuration was still not defining
WorkaroundI am now forced to set Proposal to avoid thisShould the provider do a My understanding is that a Open questionWith that been said, I am not sure anymore if this problem should actually be reported to https://github.com/terraform-aws-modules/terraform-aws-rds or is actually about the AWS Provider. |
Actually reading one more time the documentation of the module we are using, and more specifically about
Seems like by switching from Happy to close this issue if you say so. |
@etiennechabert Thanks for the response. |
We are facing the same issue. When trying to configure a migration from gp2 to gp3 with iops parameter it is failing with the above error. The only possible way to do it right now it to separate it to two terraform runs, which is not ideal. |
@TomWizen can you please share if you are using this module on top of the AWS Provider: https://github.com/terraform-aws-modules/terraform-aws-rds |
I started over again all my tests, this time directly using In this messages my results for creation tests, in next message I will put my transition test results:
Note: same results with a Create a mariadb with gp3: 🟢
Just works Create a mariadb with gp3 while setting IOPS to 3000 🟥
Error:
Create a mariadb with gp3 while setting IOPS to 3000 and storage_throughput to 125 🟥
Error:
I find this test interesting, because in the end, this is exactly the state of the database succesfully created in my first test ( NoteI know that the creation is not what was initially the topic of this issue, but I still find it interesting and probably connected to this issue |
Now about transitions:
Create a mariadb with
|
Yes |
As a conclusion, my feeling is that there is a bug with the AWS Provider module:
This bug is turning to be quite blocking for the users using: https://github.com/terraform-aws-modules/terraform-aws-rds, as explained by @TomWizen, since you cannot have a valid configuration without 2x PRs, and this is because of the default values used by the module for the variable |
I've hit the same with AWS RDS module because it has explicit |
Agreed that this is a good workaround for the people using I just tested it and it's allowing:
Good finding @LDVSOFT 👏 |
Regarding https://github.com/terraform-aws-modules/terraform-aws-rds/releases/tag/v5.2.1 |
@etiennechabert Thanks for the very thorough write-up of your failing scenarios 👏. |
Just pasting my message from another post: We have an issue where if we build an RDS instance at 100GiB specifying GP3 storage then the module dynamically sets IOPS to 3000 and throughput to 125MiB as expected However, if we change the allocated_storage to 400GiB or more and apply that the apply fails with the below error Error: updating RDS DB Instance (pg-prod-team-gp3): operation error RDS: ModifyDBInstance, https response error StatusCode: 400, RequestID: 970841cc-a412-4147-820c-700cb17e27fd, api error InvalidParameterCombination: Invalid iops value for engine name postgres and storage type gp3: 3000 If we build an RDS instance from a 100GiB snapshot but specify 400GiB in the terraform code at initial build it does the modification as expected and increases the storage/IOPS/throughput But if we modify it after the instance has been built it errors. Ideally if it could dynamically lookup the values for IOPS/throughput that would be great. If they've been set in the code then set them to that but if they're null or not set to use the defaults i.e <400GiB 3K IOPS/125 MiB/S or >=400GiB 12K IOPS 500MiB/s Do you know if this has been reported elsewhere? |
@cdl-danielchapman Please open a new GitHub Issue. Thanks. |
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. |
Terraform Core Version
1.2.3
AWS Provider Version
4.46.0
Affected Resource(s)
Expected Behavior
If specifying
iops
is mandatory when choosinggp3
:If IOPS is NOT mandatory when choosing
gp3
:iops
Actual Behavior
The first apply was successful, allowing me to switch an existing RDS instance from GP2 to GP3. But now my pipeline is blocked with the following plan/error
I can work around the error by adding to my resource the optional
iops
parameter with a value of3000
, unblocking my pipeline by avoiding the change:Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
After first apply (you have an RDS instance on gp2), change storage_type, and apply two times: after the 1st apply you are on gp3, but now the 2nd (and following) applies will fail:
Steps to Reproduce
api error InvalidParameterCombination: You can't specify IOPS or storage throughput for engine postgres and a storage size less than 400
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: