unable to create aurora global cluster
Description:
I am encountering an error related to the master_username configuration in Terraform module for setting up an RDS instance. The error occurs during the terraform apply phase. Below is a detailed description of the issue:
Issue:
When applying the Terraform configuration for an RDS instance, I receive an error indicating a problem with the master_username parameter. The error message suggests that the master_username must be provided, but it does not provide specific details about the nature of the issue.
Error: creating RDS Cluster (rds-uw2--dbcluster): operation error RDS: CreateDBCluster, https response error StatusCode: 400, RequestID: 650c2e56-9f99-4cb1-abcf-b28f1c881906, api error InvalidParameterValue: The parameter MasterUsername must be provided and must not be blank. β β with module.rds-aurora-secondary[0].aws_rds_cluster.this[0], β on .terraform/modules/rds-aurora-secondary/main.tf line 39, in resource "aws_rds_cluster" "this": β 39: resource "aws_rds_cluster" "this" { β
Here the primary DB and its reader and writer instances have been created, but when its trying to create the secondary cluster so giving the above error.
this is the sample code.
module "rds-cluster" { source = "terraform-aws-modules/rds-aurora/aws" version = "8.3.1" name = local.dbcluster_cluster engine = var.engine engine_version = var.engine_version master_username = var.masterusername manage_master_user_password = false master_password = random_password.master.result storage_type = "aurora-iopt1" kms_key_id = "${aws_kms_key.cmk-key.arn}" storage_encrypted = true preferred_maintenance_window = var.maintenance_window auto_minor_version_upgrade = var.auto_minor_version_upgrade create_security_group = var.create_security_group preferred_backup_window = var.backup_window deletion_protection = var.deletion_protection final_snapshot_identifier = local.final_snapshot_identifier
global_cluster_identifier = aws_rds_global_cluster.global-cluster[count.index].id : null }
module "rds-cluster-secondary" { source = "terraform-aws-modules/rds-aurora/aws" version = "8.3.1"
providers = { aws = aws.secondary } is_primary_cluster = false name = local.dbcluster_clusterS engine = var.engine engine_version = var.engine_version master_username = var.masterusername master_password = random_password.master.result storage_type = "aurora-iopt1" manage_master_user_password = false kms_key_id = "${aws_kms_replica_key.cmk-replica[count.index].arn}" storage_encrypted = true
global_cluster_identifier = aws_rds_global_cluster.global-cluster[count.index].id
depends_on = [ module.rds-cluster ]
}
...
still same issue
The latest version of this module is 9.9.1, you're using 8.3.1. What happens when you upgrade to the current release?
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days
This issue was automatically closed because of stale in 10 days
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.