-
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
allow some aws_db_instance changes on "storage-full" state #3708
allow some aws_db_instance changes on "storage-full" state #3708
Conversation
Hi @jordane! 👋 Thanks for submitting this. I think we'll want to understand the RDS API behavior here a little more before making this adjustment. Some questions I have:
Regardless of the answers above, we probably want to:
|
Hi @bflad, Yes, attempting to modify non-storage attributes produces the following error:
It turns out that the RDS documentation was out-of-date for sqlserver, and resizing is now a valid operation there as well. I've removed the guard on that piece of code. I added [1] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Status.html |
💯 Thanks again for all your work here.
Fantastic on both accounts! Given the behavior I think in this case we can just add
This is certainly a cat and mouse game for us -- I would definitely create a separate issue for them if they make sense. Is there a reason we should let an instance sit waiting for |
When an rds instance goes into "storage-full" mode, some limited changes are still allowed, like increasing allocated storage (for most engines). This change allows storage allocation increase when an rds instance is in a full state, unless the engine does not permit it (sqlserver) See https://aws.amazon.com/premiumsupport/knowledge-center/rds-out-of-storage/ Signed-off-by: Jordan Evans <jevans+git@linuxfoundation.org>
ff52431
to
6c73f32
Compare
That makes sense to me. I've made the suggested change, and squashed things down.
What I meant was that an instance in the |
Ah yes, of course! That would be great. Feel free to also include it here since its a trivial change. |
…States Signed-off-by: Jordan Evans <jevans+git@linuxfoundation.org>
I have done so. I'll go through some of the other states and file a future issue/pr for those. Thanks! |
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.
LGTM once TravisCI agrees 🚀
This has been released in version 1.12.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Currently, terraform will error if the following are true:
allocated_storage
of an aws_db_instancestorage-full
stateapply_immediately
is set to falseHowever, this is a perfectly valid operation to perform for most db engines.
See https://aws.amazon.com/premiumsupport/knowledge-center/rds-out-of-storage/
This change allows
allocated_storage
andiops
to be changed (andnot applied immediately).
For reference, here is the change and error produced (resource name and ID are changed):
There are currently no tests in this PR. I don't have a good idea of how to write an Acceptance test for this, and I didn't see any tests for the
storage-optimization
state that was added previously.