Skip to content
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

Feature request: AWS RDS Clone #2321

Closed
hashibot opened this issue Nov 16, 2017 · 10 comments
Closed

Feature request: AWS RDS Clone #2321

hashibot opened this issue Nov 16, 2017 · 10 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@hashibot
Copy link

This issue was originally opened by @gotoadmin as hashicorp/terraform#16671. It was migrated here as a result of the provider split. The original body of the issue is below.


The RDS instance clone functionality has been introduced by AWS. When could we expect such possibility in Terraform?

@hashibot hashibot added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 16, 2017
@stumyp
Copy link

stumyp commented Jan 24, 2018

I also vote for this feature, we have a case, when we need to copy production database to staging on regular basis and snapshot/restore process takes about 2 hours, while cloning is much faster.

@stumyp
Copy link

stumyp commented Jan 24, 2018

@radeksimko radeksimko added the service/rds Issues and PRs that pertain to the rds service. label Jan 28, 2018
@dan-petty
Copy link
Contributor

Above URL didn't work for me. Here's the one I found:
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Clone.html

@dbsaysitall
Copy link

Has this issue been addressed? It would be very useful to clone the database as part of the infrastructure set up.

@anGie44
Copy link
Contributor

anGie44 commented Nov 11, 2020

Hi @bro98025 et al. 👋 I believe this duplicates #5286 and is currently being addressed . The naming differs but I believe the expected behavior is identical as the underlying API method (restore to point in time for both rds clusters and db instances) is used in both situations (clone vs. restore) per AWS RDS docs.

@anGie44 anGie44 added this to the v3.15.0 milestone Nov 12, 2020
@anGie44
Copy link
Contributor

anGie44 commented Nov 12, 2020

Hi all, one last follow-up here: support for cloning an Aurora RDS cluster has been merged with #7031 and will release with v3.15.0 of the Terraform AWS Provider, likely out later today.

To use this feature, the argument restore_to_point_in_time restore_type in the rds_cluster resource must be specified with copy-on-write.

Reference: https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBClusterToPointInTime.html (see RestoreType specs)

RestoreType
The type of restore to be performed. You can specify one of the following values:
full-copy - The new DB cluster is restored as a full copy of the source DB cluster.
copy-on-write - The new DB cluster is restored as a clone of the source DB cluster.

Constraints: You can't specify copy-on-write if the engine version of the source DB cluster is earlier than 1.11.
If you don't specify a RestoreType value, then the new DB cluster is restored as a full copy of the source DB cluster.

@anGie44 anGie44 closed this as completed Nov 12, 2020
@dbsaysitall
Copy link

dbsaysitall commented Nov 12, 2020 via email

@Gufran
Copy link
Contributor

Gufran commented Nov 12, 2020

Cross account cloning should work with properly shared clusters and permissions in place. The API and options are same as same account cloning.

@ghost
Copy link

ghost commented Nov 12, 2020

This has been released in version 3.15.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!

@ghost
Copy link

ghost commented Dec 13, 2020

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!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants