-
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
With aws_db_instance when you remove the snapshot_identifier it wants to force a new resource #467
Comments
Any thoughts on how this could be improved? We are having to do some pretty gnarly TF state manipulation when setting up plans to restore multiple db instances from snapshots.. would be nice to have a simple way of doing the one-off snapshot id. |
same problem for me, what is the other way to fix that ? |
I'm working around this by having a lifecyle ignore_changes on the resource (within a module in my case)
and then I do something like Not ideal, but does the trick. "" -> "something" (triggers new resource) I'm thinking on the use case where I trigger an one-off restore by issuing
|
This issue is still present today (we are using It's inconvenient keeping this ref around when the snapshot itself is long gone. This is analogous to the same procedure with EBS volumes. However with EBS volumes have been created from a snapshot you can safely remove the snapshot ref ID in Terraform without Terraform wanting to make any changes. If nothing else the behaviour is inconsistent. |
I ran into this (and #2635) earlier and ended up using this process:
|
@acdha I think only 5, 6, 7, and 8 are specific to working around this issue, but I'm not really in a position to test it at the moment. |
This has been released in version 3.32.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. 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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @donnoman as hashicorp/terraform#11196. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.8.4
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
No change required. In the future and for other environments I don't want this snapshot used. This snapshot was a restoration, because the last terraform run killed my DB
Actual Behavior
It wants to kill my newly restored db
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
with the snapshot you need restoredterraform apply
The text was updated successfully, but these errors were encountered: