diff --git a/examples/postgresql/main.tf b/examples/postgresql/main.tf index 0974f17..5cf2d69 100644 --- a/examples/postgresql/main.tf +++ b/examples/postgresql/main.tf @@ -32,8 +32,9 @@ module "aurora" { storage_type = "aurora-iopt1" instances = { 1 = { - instance_class = "db.r5.2xlarge" - publicly_accessible = true + instance_class = "db.r5.2xlarge" + publicly_accessible = true + db_parameter_group_name = "default.aurora-postgresql14" } 2 = { identifier = "static-member-1" diff --git a/main.tf b/main.tf index af5e50f..8e617c3 100644 --- a/main.tf +++ b/main.tf @@ -162,7 +162,7 @@ resource "aws_rds_cluster_instance" "this" { ca_cert_identifier = var.ca_cert_identifier cluster_identifier = aws_rds_cluster.this[0].id copy_tags_to_snapshot = try(each.value.copy_tags_to_snapshot, var.copy_tags_to_snapshot) - db_parameter_group_name = var.create_db_parameter_group ? aws_db_parameter_group.this[0].id : var.db_parameter_group_name + db_parameter_group_name = var.create_db_parameter_group ? aws_db_parameter_group.this[0].id : try(each.value.db_parameter_group_name, var.db_parameter_group_name) db_subnet_group_name = local.db_subnet_group_name engine = var.engine engine_version = var.engine_version