_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?
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.
Here is more information on this:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.Clone.html
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
Has this issue been addressed? It would be very useful to clone the database as part of the infrastructure set up.
Hi @bro98025 et al. 👋 I believe this duplicates https://github.com/hashicorp/terraform-provider-aws/issues/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.
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.
Thank you for the update. Will this release support cross AWS account
cloning as well? Reference below.
On Thu, Nov 12, 2020 at 10:37 AM angie pinilla notifications@github.com
wrote:
Hi all, one last follow-up here: support for cloning an Aurora RDS cluster
has been merged with #7031
https://github.com/hashicorp/terraform-provider-aws/pull/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—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hashicorp/terraform-provider-aws/issues/2321#issuecomment-726262223,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFBBYY6LGJVCUFPK2XCLDCTSPQTNVANCNFSM4EECHU2A
.
Cross account cloning should work with properly shared clusters and permissions in place. The API and options are same as same account cloning.
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!
Most helpful comment
Has this issue been addressed? It would be very useful to clone the database as part of the infrastructure set up.