Skip to content

Commit

Permalink
upgraded NAC's admin RDS DB instance class from T2 to T3 and enabled …
Browse files Browse the repository at this point in the history
…performance optimisation
  • Loading branch information
juddin927 committed Jun 20, 2024
1 parent ab90b0c commit 475f457
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions modules/admin/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_db_instance" "admin_db" {
allow_major_version_upgrade = false
apply_immediately = var.db.apply_updates_immediately
delete_automated_backups = var.db.delete_automated_backups
instance_class = "db.t2.medium"
instance_class = "db.t3.medium"
identifier = var.prefix
name = replace(var.prefix, "-", "_")
username = var.db.username
Expand All @@ -26,7 +26,9 @@ resource "aws_db_instance" "admin_db" {

enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"]

parameter_group_name = aws_db_parameter_group.admin_db_parameter_group_v8.name
parameter_group_name = aws_db_parameter_group.admin_db_parameter_group_v8.name
performance_insights_enabled = true
ca_cert_identifier = "rds-ca-rsa2048-g1"

tags = var.tags
}
Expand Down
2 changes: 1 addition & 1 deletion modules/admin/restore_db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "aws_db_instance" "admin_db_restored" {
allow_major_version_upgrade = false
apply_immediately = var.db.apply_updates_immediately
delete_automated_backups = true
instance_class = "db.t2.medium"
instance_class = "db.t3.medium"
identifier = "${var.prefix}-restored"
name = replace(var.prefix, "-", "_")
username = var.db.username
Expand Down
2 changes: 2 additions & 0 deletions modules/admin_read_replica/radius_read_replica.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ resource "aws_db_instance" "admin_read_replica" {
deletion_protection = false
option_group_name = aws_db_option_group.mariadb_audit_v8.name
enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"]
performance_insights_enabled = true
ca_cert_identifier = "rds-ca-rsa2048-g1"

lifecycle {
ignore_changes = [
Expand Down

0 comments on commit 475f457

Please sign in to comment.