Reputation: 89
I have an AWS Aurora cluster provisioned with terraform. In terms of disaster recovery its configured with multi AZ for automated failover. For data corruption event we plan todo Point In Time recovery by manually provisioning the cluster using the aws console in the event of data corruption so to recover quickly.
After the newly restored cluster is provisioned I would like to manage the provisioned cluster under Terraform.
What is the best way achieve this? Should I import the aws_rds_cluster
and aws_rds_cluster_instance
and tweak the configuration until I have no differences in the terraform plan or is there an alternative way achieve this?
Thanks guys.
Im essentially looking for advice or opinions on the subject.
Upvotes: 1
Views: 612
Reputation: 238209
In terms of disaster recovery its configured with multi AZ for automated failover.
MZ failover does not affect your TF. So when the failover happens, there shouldn't be anything to do in TF.
After the newly restored cluster is provisioned I would like to manage the provisioned cluster under Terraform.
You will have to import it, as the new cluster will have different ID. Your original cluster will still exist after you restore it, and TF will not be aware of the new one. So you will have to destroy old Aurora instances and manage importing the new one.
The best way to clarify these operations is to actually perform them on dummy clusters. Once you verify that your operations perform as expected on the dummy clusters, you can attempt that on a production cluster (after snapshoting it!).
Upvotes: 3