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

Cross-region replication not working #157

Open
vale21 opened this issue Nov 17, 2022 · 3 comments
Open

Cross-region replication not working #157

vale21 opened this issue Nov 17, 2022 · 3 comments
Labels
bug 🐛 An issue with the system

Comments

@vale21
Copy link

vale21 commented Nov 17, 2022

Found a bug? Maybe our Slack Community can help.

Slack Community

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:

  1. Create a global cluster using aws_rds_global_cluster Terraform resource
  2. Create an Aurora MySQL cluster using your module, specifying global_cluster_identifier
  3. Create another Aurora MySQL cluster using your module, specifying global_cluster_identifier and source_region
  4. 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.

@vale21 vale21 added the bug 🐛 An issue with the system label Nov 17, 2022
@vale21
Copy link
Author

vale21 commented Dec 19, 2022

Hello. Any update on this, please?

@goruha
Copy link
Member

goruha commented Jan 11, 2023

@vale21

  1. Do you use replication_source_identifier for the secondary database?
  2. could you try calling the secondary database module with variables?
db_name = null

@vale21
Copy link
Author

vale21 commented Apr 24, 2023

This issue no longer occurs on version 1.4.0. Can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants