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

Terraform AWS Provider does not support CopyDBSnapshot #9885

Closed
PedroRibeiro95 opened this issue Aug 26, 2019 · 4 comments · Fixed by #9886
Closed

Terraform AWS Provider does not support CopyDBSnapshot #9885

PedroRibeiro95 opened this issue Aug 26, 2019 · 4 comments · Fixed by #9886
Labels
new-resource Introduces a new resource. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@PedroRibeiro95
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Terraform AWS Provider does not support the CopyDBSnapshot API call, which allows copying a manual snapshot of an RDS instance, either to the same region, to a different region or even to a different AWS account.

This functionality can be of particular use in Terraform for a multitude of reasons, including disaster recovery plans with snapshots copied across multiple regions, launch of testing environments on different regions restoring from some database snapshot, among others.

New or Affected Resource(s)

  • aws_db_snapshot_copy

Potential Terraform Configuration

resource "aws_db_snapshot_copy" "test" {
  source_region                 = "<region where the snapshot is>"
  source_db_snapshot_identifier = "<snapshot ARN>"
  target_db_snapshot_identifier = "<name to give to the copied snapshot"
  kms_key_id                    = "<key to encrypt copy>"
}

References

AWS API Call documentation: https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CopyDBSnapshot.html

AWS Go SDK documentation: https://godoc.org/github.com/aws/aws-sdk-go/service/rds#CopyDBSnapshot

@PedroRibeiro95 PedroRibeiro95 added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 26, 2019
@ghost ghost added the service/rds Issues and PRs that pertain to the rds service. label Aug 26, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 26, 2019
@bflad bflad added new-resource Introduces a new resource. and removed enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Nov 5, 2019
@joaoantunes
Copy link

Hi any news about this subject? How can I copy a snapshot between regions? Only AWS Cli?

@SpComb
Copy link

SpComb commented Aug 5, 2021

This would be required when restoring an encrypted snapshot shared from a different AWS account.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ShareSnapshot.html#USER_ShareSnapshot.Encrypted

  • Sharing an unencrypted manual DB snapshot enables authorized AWS accounts to directly restore a DB instance from the snapshot instead of taking a copy of it and restoring from that. However, you can't restore a DB instance from a DB snapshot that is both shared and encrypted. Instead, you can make a copy of the DB snapshot and restore the DB instance from the copy.

@github-actions github-actions bot added this to the v4.15.0 milestone May 16, 2022
@github-actions
Copy link

This functionality has been released in v4.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. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants