Closed rachlenko closed 1 month ago
You will want to set manage_master_user_password = false
. Example here.
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.
Description
Module : "aurora_postgresql" The functionality of using a previously generated password does not seem to work
Versions
1.9.2, 1.6
Reproduction Code [Required]
data "aws_rds_engine_version" "postgresql" { engine = "aurora-postgresql" version = "14.9" }
resource "random_password" "master" { length = 20 special = false }
module "aurora_postgresql" { source = "terraform-aws-modules/rds-aurora/aws" count = 1 name = "clusterNamePostgresql"
engine = data.aws_rds_engine_version.postgresql.engine
engine_mode = "serverless" storage_encrypted = true master_username = "root"
vpc_id = var.postgresql_spec.vpc_id db_subnet_group_name = "subnet-test" security_group_rules = { vpc_ingress = { from_port = 5432 to_port = 5432 protocol = "tcp" cidr_blocks = module.vpc.private_subnets_cidr_blocks description = "Allow PostgreSQL traffic" } }
master_password = random_password.master.result
monitoring_interval = 30
preferred_maintenance_window = local.v2_preferred_maintenance_window
skip_final_snapshot = false
scaling_configuration = {
} }
Steps to reproduce the behavior:
terraform init terraform plan terraform apply
Expected behavior
I attempted to install an RDS serverless cluster using a previously generated password for the master user
Terminal Output Screenshot(s)
I used the example with aurora_postgresql and got the following errors:
β Error: creating RDS Cluster (aurora-postgresql-test): InvalidParameterValue: The parameter ManageMasterUserPassword is not valid for engine mode: serverless. β status code: 400, request id: c2ae05e3-71a3-4296-88ba-5c793fd898e9 β β with module.test.module.aurora_postgresql[0].aws_rds_cluster.this[0], β on .terraform/modules/test.aurora_postgresql/main.tf line 39, in resource "aws_rds_cluster" "this": β 39: resource "aws_rds_cluster" "this" {