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

RDS: Cross-region automated backups #23673

Closed
cdobbyn opened this issue Mar 14, 2022 · 4 comments · Fixed by #23759
Closed

RDS: Cross-region automated backups #23673

cdobbyn opened this issue Mar 14, 2022 · 4 comments · Fixed by #23759
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

@cdobbyn
Copy link

cdobbyn commented Mar 14, 2022

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 other comments that do not add relevant new information or questions, 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

In RDS it is possible to enable snapshots to be saved in another region besides the region the instance is in. This is helpful from a disaster recovery standpoint.

New or Affected Resource(s)

  • aws_db_instance
  • aws_rds_cluster

Potential Terraform Configuration

resource "aws_db_instance" "default" {
  ...
  backup_replication_region = "us-west-2"
  backup_replication_period = 7
  backup_replication_kms_key_id = "11111111-aaaa-1111-aaaa-111111111111"
  ...
}

References

@cdobbyn cdobbyn added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 14, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/rds Issues and PRs that pertain to the rds service. labels Mar 14, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 15, 2022
@bschaatsbergen
Copy link
Member

I'll happily check this out and pick it up.

@bschaatsbergen
Copy link
Member

bschaatsbergen commented Mar 16, 2022

@ewbankkit something we would want to treat as a new resource or make it part of the existing aws_db_instance and aws_rds_cluster resources?

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReplicateBackups.html#AutomatedBackups.Replicating.Enable

https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_StartDBInstanceAutomatedBackupsReplication.html

Update: Working on a new resource
(Below shows how to replicate automated backups from eu-west-1 to eu-central-1)

resource "aws_db_instance_backup_replication" "default" {
  source_db_instance_arn = "arn:aws:rds:eu-west-1:837424938642:db:example-db"
  kms_key_id             = "arn:aws:kms:eu-central-1:837424938642:key/example-id"
}

provider "aws" {
  region = "eu-central-1"
}

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

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

github-actions bot commented May 8, 2022

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 May 8, 2022
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.

3 participants