terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
385 stars 573 forks source link

Error while creating replica cluster, #438

Closed rohitjha941 closed 8 months ago

rohitjha941 commented 8 months ago

Description

I am trying to create a replica cluster with postgres as a source.

If your request is for a new feature, please use the Feature request template.

Versions

Reproduction Code [Required]

module "rds" {
  source = "terraform-aws-modules/rds-aurora/aws"

  name        = "${var.name}-${var.environment}"
  engine      = "aurora-postgresql"
  engine_mode = "provisioned"

  engine_version = "14.10"

  vpc_id               = module.vpc.vpc_id
  db_subnet_group_name = module.vpc.database_subnet_group_name

  vpc_security_group_ids = [module.all_security_group.security_group_id]

  replication_source_identifier = "<rds postgres arn>"

  monitoring_interval = 60

  apply_immediately           = true
  skip_final_snapshot         = true
  storage_encrypted           = true
  create_security_group       = false
  manage_master_user_password = false
  is_primary_cluster          = false

  serverlessv2_scaling_configuration = {
    min_capacity = 2
    max_capacity = 10
  }

  instance_class = "db.serverless"
  instances = {
    one = {}
    two = {}
  }
}

Steps to reproduce the behaviour:

Expected behaviour

A replica Aurora cluster will be created for RDS Postgres with two instances.

Actual behaviour

A replica Aurora cluster is created with one instance and there is an error with another instance,

Error: creating RDS Cluster (<id>) Instance (<id>): InvalidParameterValue: Creation of an Aurora Replica in a cluster which is already replicating from an RDS for PostgreSQL master is not allowed. status code: 400, request id: 99343ae4-d97c-495c-8cdb-c396b7be9a9e

github-actions[bot] commented 7 months ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.