From 475f457f8e4887b140f594ec281633552920d83a Mon Sep 17 00:00:00 2001 From: Jahir Date: Wed, 19 Jun 2024 14:43:16 +0100 Subject: [PATCH 1/2] upgraded NAC's admin RDS DB instance class from T2 to T3 and enabled performance optimisation --- modules/admin/db.tf | 6 ++++-- modules/admin/restore_db.tf | 2 +- modules/admin_read_replica/radius_read_replica.tf | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/admin/db.tf b/modules/admin/db.tf index eefb36e..a8728a9 100644 --- a/modules/admin/db.tf +++ b/modules/admin/db.tf @@ -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 @@ -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 } diff --git a/modules/admin/restore_db.tf b/modules/admin/restore_db.tf index d568b01..c693f87 100644 --- a/modules/admin/restore_db.tf +++ b/modules/admin/restore_db.tf @@ -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 diff --git a/modules/admin_read_replica/radius_read_replica.tf b/modules/admin_read_replica/radius_read_replica.tf index c855b5c..0306185 100644 --- a/modules/admin_read_replica/radius_read_replica.tf +++ b/modules/admin_read_replica/radius_read_replica.tf @@ -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 = [ From c6441b909c062c516bb34d5d5d4ed38c9c18228d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 20 Jun 2024 13:13:53 +0000 Subject: [PATCH 2/2] Commit changes made by code formatters --- modules/admin_read_replica/radius_read_replica.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/admin_read_replica/radius_read_replica.tf b/modules/admin_read_replica/radius_read_replica.tf index 0306185..b58f05b 100644 --- a/modules/admin_read_replica/radius_read_replica.tf +++ b/modules/admin_read_replica/radius_read_replica.tf @@ -20,8 +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" + performance_insights_enabled = true + ca_cert_identifier = "rds-ca-rsa2048-g1" lifecycle { ignore_changes = [