Cross-region replication not working
vale21 opened this issue · 3 comments
Found a bug? Maybe our Slack Community can help.
Describe the Bug
I am trying to configure Auirora Global Cluster spenned on 2 regions. I craete the "aws_rds_global_cluster" terraform resource externally, and then I am trying to use your mopdule to deploy the 2 sub-clusters in 2 regions. The main cluster works fine, the secondary raises errors:
creating RDS Cluster (): InvalidParameterCombination: Cannot specify database name for cross region replication cluster
creating RDS Cluster (): InvalidParameterCombination: Cannot specify user name for cross region replication cluster
I am using global_cluster_identifier to enable the cross-region replication feature. For the secondary cluster I am also specifying source_region to link it to the main one.
Using a local foek of your module I made it work by commenting out 3 lines the source:
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster#replication_source_identifier
resource "aws_rds_cluster" "secondary" {
count = local.enabled && !local.is_regional_cluster ? 1 : 0
cluster_identifier = var.cluster_identifier == "" ? module.this.id : var.cluster_identifier
# database_name = var.db_name
# master_username = local.ignore_admin_credentials ? null : var.admin_user
# master_password = local.ignore_admin_credentials ? null : var.admin_password
Expected Behavior
I was expecting a second cluster to be deployed on the second region, having it connected to the global cluster
Steps to Reproduce
Steps to reproduce the behavior:
- Create a global cluster using aws_rds_global_cluster Terraform resource
- Create an Aurora MySQL cluster using your module, specifying global_cluster_identifier
- Create another Aurora MySQL cluster using your module, specifying global_cluster_identifier and source_region
- See the error
Screenshots
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
- OS: [e.g. Linux, OSX, WSL, etc]
- Version [e.g. 10.15]
Additional Context
Add any other context about the problem here.
Hello. Any update on this, please?
- Do you use
replication_source_identifier
for the secondary database? - could you try calling the secondary database module with variables?
db_name = null
This issue no longer occurs on version 1.4.0. Can be closed