Skip to content

Commit

Permalink
RDS: Down default cluster count to var.db_min_capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Mar 14, 2024
1 parent f4bc1be commit 353c03d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "aws_rds_cluster" "this" {
enabled_cloudwatch_logs_exports = ["audit"]

serverlessv2_scaling_configuration {
min_capacity = 1
min_capacity = var.db_min_capacity
max_capacity = var.db_max_capacity
}

Expand All @@ -31,7 +31,7 @@ resource "aws_rds_cluster" "this" {
}

resource "aws_rds_cluster_instance" "cluster_instances" {
count = 3
count = var.db_min_capacity
availability_zone = module.vpc.azs[count.index % length(module.vpc.azs)]

engine = "aurora-mysql"
Expand Down

0 comments on commit 353c03d

Please sign in to comment.