-
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
RDS Aurora Cross-Region replication for encrypted cluster failing #630
Comments
@twofivetechnology @grubernaut Any work around that can help to remediate the problem?? |
Is the SourceRegion being specified
|
Looking quickly through the code, I believe it is the next change that needs to happen:
I also thought to add it in the describe-output in the function resourceAwsRDSClusterRead - but looks like this param isn't returned by the SDK. I'm however very new to go - and the first time that I look into terraform-code and I'm also not familiar yet with the aws api - so would be great if somebody could check this to see if I am on the right track here. |
I tried my proposed change - and while it looks like he takes the change, I still get an error (but a different one this time): PreSignedUrl could not be authenticated (what seems to be related to aws/aws-sdk-go#1098) |
@timboven Yes it initially seemed like the source-region is the issue but I too have been getting the same issue trying to run it with AWS CLI. If we can get a working AWS CLI request I suppose we would know the exact parameters required. The documentation doesn't seem to be consistent. |
@asadhu I have been using CLI to work around. I will redact and post the working cli bash script tonight. |
|
@twofivetechnology - Hi ... thanks for the bash script. New to Terraform here. Any inputs on how to use it in conjunction with TF ? and if the backend is S3, can I just pass the state file name to the TERRAFORM_STATE_FILE variable? |
There is a nice way actually to sync state direct to S3 backend that I haven't updated to yet (all my pipelines have a sync from S3 to begin with then a sync back to S3 in a finally block from before it was a first class citizen). As for the script above the terraform import at the end then gets the provisioned replica into your state file (so for me that gets syncd to S3 in the finally block of my groovy pipeline). The reason to consider doing that is that when the issue here is fixed (note issue might actually be in Go SDK and not terraform) you can seemlessly switch to using terraform for your replica management because it will already be tracked in your state file. |
I can confirm that sourceregion needs to be added to "aws_rds_cluster" to get around the encrypted error " cluster:aurora-cluster is encrypted; pre-signed URL has to be specified status code: 400" for encrypted cross region replicas. Hope this gets added soon I managed recreate above error with the New-rdsdbcluster in powershell , adding the -sourceregion resolved the issue. New-RDSDBCluster -SourceRegion $var_source_Region -Region $var_des_Region -DBClusterIdentifier $var_des_DBClusterIdentifier -ReplicationSourceIdentifier $var_source_ReplicationSourceIdentifier -KmsKeyId $var_des_KmsKeyId -StorageEncrypted $var_des_StorageEncrypted -DBSubnetGroupName $var_des_DBSubnetGroupName -DBClusterParameterGroupName $var_des_DBClusterParameterGroupName -Engine $var_des_Engine -Port $var_des_Port |
Have there been any updates on this? I'm having the same issue of not being able to create a cross region read replica for an encrypted cluster. |
Thanks @twofivetechnology for the work around. In the end you added the resource to the TF state . Is that sufficient for terraform to handle any future changes on the replica cluster (for eg. change the instance size or master password) can terraform handle that? Team is there any timeline for this issue to get fixed? |
This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
This issue was originally opened by @asadhu as hashicorp/terraform#12985. It was migrated here as part of the provider split. The original body of the issue is below.
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
v0.9.1_1
Affected Resource(s)
RDS Cross-Region Cluster replication
Terraform Configuration Files
Debug Output
status code: 400
Panic Output
Expected Behavior
What should have happened?
I have an AWS RDS Aurora Cluster in US East and am trying to create a Cross-Region Cluster on the west. The Replica Cluster should have been created.
Actual Behavior
What actually happened?
The East Cluster is encrypted and requires kms_key_id and source_region/presigned_url. 'source-region/presigned_url' is not supported in Terraform 0.9.1_1.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Replication.CrossRegion.html
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: