diff --git a/main.tf b/main.tf index 8f8c60d..07b584b 100644 --- a/main.tf +++ b/main.tf @@ -5,7 +5,7 @@ locals { deployed_cluster_identifier = local.enabled ? coalesce(one(aws_rds_cluster.primary[*].id), one(aws_rds_cluster.secondary[*].id)) : "" db_subnet_group_name = one(aws_db_subnet_group.default[*].name) - instance_class = var.serverlessv2_scaling_configuration != null ? "db.serverless" : var.instance_type + instance_class = var.instance_type cluster_instance_count = local.enabled ? var.cluster_size : 0 is_regional_cluster = var.cluster_type == "regional" @@ -324,7 +324,7 @@ resource "random_pet" "instance" { prefix = var.cluster_identifier == "" ? module.this.id : var.cluster_identifier keepers = { cluster_family = var.cluster_family - instance_class = var.serverlessv2_scaling_configuration != null ? "db.serverless" : var.instance_type + instance_class = local.instance_class } } diff --git a/variables.tf b/variables.tf index 9a0cef7..f0e22b7 100644 --- a/variables.tf +++ b/variables.tf @@ -27,7 +27,7 @@ variable "subnets" { variable "instance_type" { type = string default = "db.t2.small" - description = "Instance type to use" + description = "Instance type to use. Use db.serverless for serverlessv2" } variable "cluster_identifier" {