-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix error creating aws_db_instance from snapshot where snapshot uses storage_type io1 #5800
Conversation
Hi @dannosaur 👋 Thanks for submitting this! Can you please provide an acceptance test or an example of your configuration so we can verify this as well as prevent future regressions? |
I'm actually unsure as to how one might build an acceptance test for this. The issue being that in order to hit this piece of code, one must restore a database from a snapshot. As I understand it (please excuse the fact that I have extremely little knowledge of Go), these tests work by creating real resources and testing that the result is as expected? If this is the case, then whoever's testing has a prerequisite in that they need a snapshot ARN to hand in order to restore it from. Public snapshots are a thing, but I can't find a list of anything to use (and the removal of said snapshot would break the test, obviously not what we want). How would you actually go about this? Is there another method where you can "fake" the calls somehow and test that the calls made are what's expected and in the right order? Help appreciated on this one. I'd love to contribute more. |
@dannosaur no worries -- we have existing acceptance testing similar to what needs to be done here where we create a database, snapshot it, then create a second database that is restored from snapshot. Check out: and Then to run it:
|
I am seeing this issue as well in: I am trying to create a postgresql db instance from a snapshot made on an io1 db to a new io1 db. |
Our RDS sandbox builds are failing due to this. Any ETA on the release of the fix? |
We've been getting hit with this bug for a few months now. Current setup:
|
Is this not being merged because of a lack of tests? If so, I can take on this task based on @bflad's comments from above. But if someone else is working on it, I don't want to duplicate effort... This is pretty critical for my company's workflow, so it would be great to see it fixed! |
@sklarsa yes, that's correct. I simply lack the time to sit and study how the test suite works, and learn enough of Go's syntax to write correct and valid tests that pass. |
I'll take a stab at it, although I'm unfamiliar with how the test suite works too :-D
…On Thu, Jan 31, 2019 at 1:06 PM Dan Jones ***@***.***> wrote:
@sklarsa <https://github.com/sklarsa> yes, that's correct. I simply lack
the time to sit and study how the test suite works, and learn enough of
Go's syntax to write correct and valid tests that pass.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB1xRWcaoo6AeyovyxCTgOh2lLTNXndWks5vIzC2gaJpZM4Wcccv>
.
|
Any updates? Running into the same issue - for the same use-case, whereby we're trying to create an RDS Postgres 10 DB (io1) from a RDS Postgres 10 DB (io1) snapshot, getting the error:
Initial creation succeeds, modification fails as described in the symptoms. Any workarounds if no fixes? As this is blocking our company from re-creating existing (populated) databases in Terraform. |
My PR #7426 addresses this problem, but it needs review |
hitting same issue here... can we please merge? thanks |
Would be amazing. This is the only thing seemingly stopping us from terraforming our database with an existing snapshot. |
cc @bflad |
As noted here: #7426 (review) Merging this first so @dannosaur gets proper attribution then merging #7426. Thanks so much @dannosaur and @sklarsa |
This has been released in version 1.60.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! |
There's no issue number for this, this is something I've stumbled across when trying to build an environment in a very specific way.
When restoring a DB instance from a snapshot, where the snapshot uses io1 storage type, the initial create succeeds, but the second step of the create within terraform that modifies the DB instance to sync it up with the resource state fails due to the fact that the iops config item isn't passed. The error it crashes out with is:
Changes proposed in this pull request:
Output from acceptance testing: N/A