From fe63f83476e35068c16a8098bfcc86b874d2139c Mon Sep 17 00:00:00 2001 From: dydxwill <119354122+dydxwill@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:25:25 -0400 Subject: [PATCH] Add read replica storage variable (#137) * add read replica storage var * set default --- indexer/rds.tf | 2 ++ indexer/variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/indexer/rds.tf b/indexer/rds.tf index 72a7383e..83d29a8a 100644 --- a/indexer/rds.tf +++ b/indexer/rds.tf @@ -231,6 +231,7 @@ resource "aws_db_instance" "read_replica" { # be specified for a replica, and will match the properties on the source db. vpc_security_group_ids = [aws_security_group.rds.id] parameter_group_name = aws_db_parameter_group.main.name + allocated_storage = var.rds_read_replica_db_allocated_storage_gb publicly_accessible = false # Set to true if any planned changes need to be applied before the next maintenance window. apply_immediately = false @@ -256,6 +257,7 @@ resource "aws_db_instance" "read_replica_2" { # be specified for a replica, and will match the properties on the source db. vpc_security_group_ids = [aws_security_group.rds.id] parameter_group_name = aws_db_parameter_group.main.name + allocated_storage = var.rds_read_replica_db_allocated_storage_gb publicly_accessible = false # Set to true if any planned changes need to be applied before the next maintenance window. apply_immediately = false diff --git a/indexer/variables.tf b/indexer/variables.tf index 37f1ed6d..30c46764 100644 --- a/indexer/variables.tf +++ b/indexer/variables.tf @@ -115,6 +115,12 @@ variable "rds_db_allocated_storage_gb" { description = "Storage allocated to the Postgres RDS DB in GB" } +variable "rds_read_replica_db_allocated_storage_gb" { + type = number + description = "Storage allocated to the Postgres RDS read replica DBs in GB" + default = 1000 +} + variable "elasticache_redis_num_cache_clusters" { type = number description = "Number of elasticache cache clusters"