Skip to content

Commit

Permalink
Add ability to specify rds instance class (#371)
Browse files Browse the repository at this point in the history
* add variable to specify rds instance class type

* changeset
  • Loading branch information
meyerjrr authored Nov 18, 2024
1 parent 520b2a1 commit 945cf8c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hot-readers-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@common-fate/terraform-aws-common-fate-deployment": patch
---

add variable to set custom rds database instance class type
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module "control_plane_db" {
apply_immediately = var.rds_apply_immediately
snapshot_identifier = var.rds_snapshot_identifier
rds_instance_identifier_suffix = var.rds_instance_identifier_suffix
rds_instance_type = var.rds_instance_type
}


Expand Down
2 changes: 1 addition & 1 deletion modules/database/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_db_instance" "pg_db" {
allocated_storage = 20
engine = "postgres"
engine_version = "15"
instance_class = "db.t3.micro"
instance_class = var.rds_instance_type
db_name = "postgres"
username = "postgres"
manage_master_user_password = true
Expand Down
6 changes: 6 additions & 0 deletions modules/database/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ variable "rds_instance_identifier_suffix" {
type = string
default = null
}

variable "rds_instance_type" {
description = "(Optional) specify the instance type of the RDS instance. defaults to db.t3.micro,"
type = string
default = "db.t3.micro"
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -509,3 +509,9 @@ variable "saml_allow_idp_initiated_sign_in" {
default = false
type = bool
}

variable "rds_instance_type" {
description = "(Optional) specify the instance type of the RDS instance. defaults to db.t3.micro,"
type = string
default = "db.t3.micro"
}

0 comments on commit 945cf8c

Please sign in to comment.