-
Notifications
You must be signed in to change notification settings - Fork 77
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
opentelekomcloud_rds_instance_v3 - restoring to original instance deletes instance incl. backups and ends in instance creation loop #2238
Comments
Hello @reiSh6phoo9o, no, you do all procedure wrong, please read documentation carefully. Yes you can restore RDS but it must be another RDS instance.
to existing one, so now you know the result. From documentation: Never use terraform with auto-approve key, terraform always informs you about force recreation, it always means that resource will be destroyed. |
Hi @anton-sidelnikov , thanks for looking into this. From what you tell, and what I found out myself, I agree, that it is not possible to restore to the same instance (aka "restore to original", as it is called in otc docs) using terraform. I disagree, that the documentation tells anything about it. Docs list three methods for restoration: restore to original, restore to existing, restore to new. The screenshot you took documents the "restore to existing", which refers to : restoring to another, already existing rds. The method "restore to original" is documented like that: From this, and from my experience using OTC webconsole, it is clearly possible and supported to restore a running RDS to an earlier point in time, without replacing the instance. The thing I ask, is two things: First, feature request: would love to see, that I can restore a RDS to a earlier point in time, as I can do using the webconsole. Second: if that's not possible: would love to see some hints in the provider documentation, that the method "restore to original" is not possible using terraform. Thanks! |
Hi @reiSh6phoo9o, yes I agree, we will update documentation first, then will think how to implement another options for restoration, currently from provider you can only restore to another instance. |
[RDS]: `opentelekomcloud_rds_instance_v3` restore to point Summary of the Pull Request Feature to restore backups to an existing rds v3 instance. PR Checklist Refers to: #2238 Tests added/passed. Documentation updated. Schema updated. Release notes added. Acceptance Steps Performed === RUN TestAccRdsPostgre13V3ParamsBasic --- PASS: TestAccRdsPostgre13V3ParamsBasic (478.33s) PASS Process finished with the exit code 0 === RUN TestAccRdsInstanceV3ElasticIP --- PASS: TestAccRdsInstanceV3ElasticIP (752.79s) PASS Process finished with the exit code 0 === RUN TestAccRdsInstanceV3Basic --- PASS: TestAccRdsInstanceV3Basic (850.40s) PASS Process finished with the exit code 0 === RUN TestAccRdsInstanceV3RestoreToPITR --- PASS: TestAccRdsInstanceV3RestoreToPITR (670.13s) PASS Process finished with the exit code 0 Reviewed-by: Vladimir Vshivkov Reviewed-by: Aloento Reviewed-by: Anton Sidelnikov
@reiSh6phoo9o feature added and documentation updated. |
Hi @artem-lifshits , I am using provider version 1.36.23 and I am facing a similar problem. When I try to "restore to original" by using the block
in the same terraform project (state) where the instance that has to be restored lives, than I simply get "By selecting this option (restore_point) a new RDS instance will be created". If I understand well it is not about restoring to the original instance, but about creating a new one. |
@anton-sidelnikov , @artem-lifshits any news about the topic? |
Hello @deem1978 could you provide your TF config with both instances? |
I've tested instance creation using restore point and everything worked fine for me.
|
Hi @artem-lifshits and thank you very much for you feedback.
So if am right you just create a new instance from a backup, and that means that it is not possible to restore to the same instance (aka "restore to original"), instead you create a new one from backup. Or do I have misunderstood something? |
Thank you :) |
Terraform provider version
provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.35.3
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
terraform apply
withoutrestore_point
block -> creates the instanceterraform apply
with additionalrestore_point
blockExpected Behavior
From docs here: https://docs.otc.t-systems.com/relational-database-service/umn/working_with_rds_for_mysql/backups_and_restorations/restoring_from_backup_files_to_db_instances.html#procedure , I assume that I can restore to the original instance.
From docs here: https://registry.terraform.io/providers/opentelekomcloud/opentelekomcloud/latest/docs/resources/rds_instance_v3#restore_point , I can not see any constraints.
When adding a
restore_point
block to an existingopentelekomcloud_rds_instance_v3
, I expect this to trigger a "Restore to Original". That is, it should not destroy the original instance, nor delete all automated backups.Alternativly, the provider docs should clearly document, that:
restore_point
block triggers instance replacment, thus deleting automated backupsActual Behavior
tf apply
triggers an instance replacement, thus:The text was updated successfully, but these errors were encountered: