From bd9b7c523f2df7cf821dca3adbd28bdfeab52307 Mon Sep 17 00:00:00 2001 From: Etienne Lachance Date: Tue, 15 Jul 2025 15:08:24 -0400 Subject: [PATCH] Add Support to set the Performance Insights Mode --- main.tf | 1 + modules/db_instance/main.tf | 1 + modules/db_instance/variables.tf | 6 ++++++ variables.tf | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/main.tf b/main.tf index de7c271b..5a9dcf78 100644 --- a/main.tf +++ b/main.tf @@ -125,6 +125,7 @@ module "db_instance" { performance_insights_enabled = var.performance_insights_enabled performance_insights_retention_period = var.performance_insights_retention_period performance_insights_kms_key_id = var.performance_insights_enabled ? var.performance_insights_kms_key_id : null + performance_insights_mode = var.performance_insights_enabled ? var.performance_insights_mode : null replicate_source_db = var.replicate_source_db replica_mode = var.replica_mode diff --git a/modules/db_instance/main.tf b/modules/db_instance/main.tf index 4b908963..336c1b7c 100644 --- a/modules/db_instance/main.tf +++ b/modules/db_instance/main.tf @@ -95,6 +95,7 @@ resource "aws_db_instance" "this" { performance_insights_enabled = var.performance_insights_enabled performance_insights_retention_period = var.performance_insights_enabled ? var.performance_insights_retention_period : null performance_insights_kms_key_id = var.performance_insights_enabled ? var.performance_insights_kms_key_id : null + performance_insights_mode = var.performance_insights_enabled ? var.performance_insights_mode : null replicate_source_db = var.replicate_source_db replica_mode = var.replica_mode diff --git a/modules/db_instance/variables.tf b/modules/db_instance/variables.tf index 31a833d2..3f12ee44 100644 --- a/modules/db_instance/variables.tf +++ b/modules/db_instance/variables.tf @@ -401,6 +401,12 @@ variable "performance_insights_kms_key_id" { default = null } +variable "performance_insights_mode" { + description = "The mode of Performance Insights that is enabled for the instance. Valid values: standard, advanced" + type = string + default = "standard" +} + variable "max_allocated_storage" { description = "Specifies the value for Storage Autoscaling" type = number diff --git a/variables.tf b/variables.tf index e00ccbfa..c926c96a 100644 --- a/variables.tf +++ b/variables.tf @@ -547,6 +547,12 @@ variable "performance_insights_kms_key_id" { default = null } +variable "performance_insights_mode" { + description = "The mode of Performance Insights that is enabled for the instance. Valid values: standard, advanced" + type = string + default = "standard" +} + variable "max_allocated_storage" { description = "Specifies the value for Storage Autoscaling" type = number