From 631053ba41ddf1bf8662d70c45dc8dde3be95e2c Mon Sep 17 00:00:00 2001 From: Michal Charemza Date: Fri, 26 Apr 2024 13:08:55 +0100 Subject: [PATCH] feat: allow optional enhanced monitoring on the datasets database This adds the option datasets_rds_cluster_instance_monitoring_interval that allows the configuration of enhanced monitoring on the RDS datasets database. The default 0, means it's disabled, which is existing behaviour. --- infra/main.tf | 4 ++++ infra/rds_datasets.tf | 1 + 2 files changed, 5 insertions(+) diff --git a/infra/main.tf b/infra/main.tf index 8283cd7..565a03e 100644 --- a/infra/main.tf +++ b/infra/main.tf @@ -159,6 +159,10 @@ variable "datasets_rds_cluster_cluster_identifier" {} variable "datasets_rds_cluster_instance_class" {} variable "datasets_rds_cluster_instance_performance_insights_enabled" {} variable "datasets_rds_cluster_instance_identifier" {} +variable "datasets_rds_cluster_instance_monitoring_interval" { + type = number + default = 0 +} variable "paas_cidr_block" {} variable "paas_vpc_id" {} diff --git a/infra/rds_datasets.tf b/infra/rds_datasets.tf index 7024298..27de96d 100644 --- a/infra/rds_datasets.tf +++ b/infra/rds_datasets.tf @@ -28,6 +28,7 @@ resource "aws_rds_cluster_instance" "datasets" { performance_insights_enabled = var.datasets_rds_cluster_instance_performance_insights_enabled promotion_tier = 1 db_parameter_group_name = var.datasets_rds_cluster_instance_parameter_group + monitoring_interval = var.datasets_rds_cluster_instance_monitoring_interval lifecycle { ignore_changes = ["engine_version"]