Skip to content

Commit

Permalink
Add read replica storage variable (#137)
Browse files Browse the repository at this point in the history
* add read replica storage var

* set default
  • Loading branch information
dydxwill authored Sep 30, 2024
1 parent 17fe918 commit fe63f83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions indexer/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions indexer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fe63f83

Please sign in to comment.