-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Unable to break the replication source and promote the cross region aws rds cluster from replica to standalone #1770
Comments
@dev-usa , was your cross region replica encrypted ? bellow is the TF that i attempted to create the read replica
i get the following error |
Sorry for the delayed response. Here are my thoughts. was your cross region replica encrypted ? NO and YES. See below. NO. Initially I did not have the databases encrypted. At that time, I created separate terraform scripts for creating primary and then spun off cross region replica. Both my primary and cross region were unencrypted storages. If you want to achieve the same using a single script you could use provider aliasing. But it does not result in a well maintainable script in my opinion. Hence, separate scripts for primary and cross region replicas. YES. Later I realized that I missed encryption and started applying kms keys. I realized that it is not possible to create encrypted replicas using terraform scripts. Hence, my primary database gets created using terraform as encrypted storage. The cross region replica is created using the below shell / aws script. Thanks.
|
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! |
Hi there,
I am able to successfully create a RDS cluster in Region 1 using the following script -
Terraform Version
Terraform v0.10.6
Affected Resource(s)
Terraform Configuration Files
and create a Cross Region replica using the below, in region 2 -
by running the below command -
All works well as expected so far and the Cross Region Replica cluster is created as expected.
However, when I want to promote the Cross Region Replica created in Region 2 to a Standalone cluster, I run -
which basically unsets the value for the "replication_source_identifier" for the "aws_rds_cluster"
I see that the output from Terraform says -
But, I see "NO CHANGE" happening to the cross region cluster on the AWS console. I still see that the replication source is existing and same and the cross region cluster is NOT updated to a "standalone" in AWS.
If I try to do the same thing via the AWS CLI -
I see that the change is triggered immediately and the Cross Region Replica is promoted to a stand alone cluster. Does anyone know where I may be doing things wrong?
or Terraform does not support promoting Cross Regional Replica's to standalone clusters. Please advice.
StackOverflow link - https://stackoverflow.com/q/46473349/829542
Debug Output
GitHub Gist containing the complete debug output -
https://gist.github.com/dev-usa/fc0d66b21952aa80760f0ffb75cb3efb
Expected Behavior
The Cross Region RDS Aurora Replica should have been promoted to a standalone cluster
Actual Behavior
No change to the infrastructure although the change is acknowledged
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: