Skip to content

Commit 8291837

Browse files
feat(rds): add database_insights_mode (#195)
* feat(rds): add database_insights_mode * fix: invalid null value The value for `database_insights_mode` can only be one of: "standard" or "advanced" * docs: updated database_insights_mode description The description still identified null as a valid value when it is not. --------- Co-authored-by: RoseSecurity <[email protected]>
1 parent 815f7a0 commit 8291837

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ resource "aws_db_instance" "default" {
8484
performance_insights_enabled = var.performance_insights_enabled
8585
performance_insights_kms_key_id = var.performance_insights_enabled ? var.performance_insights_kms_key_id : null
8686
performance_insights_retention_period = var.performance_insights_enabled ? var.performance_insights_retention_period : null
87+
database_insights_mode = var.database_insights_mode
8788

8889
monitoring_interval = var.monitoring_interval
8990
monitoring_role_arn = var.monitoring_role_arn

variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,17 @@ variable "performance_insights_retention_period" {
315315
description = "The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years)."
316316
}
317317

318+
variable "database_insights_mode" {
319+
type = string
320+
default = "standard"
321+
nullable = false
322+
description = "The mode for CloudWatch Database Insights. Valid values: 'standard' or 'advanced'."
323+
validation {
324+
condition = contains(["standard", "advanced"], var.database_insights_mode)
325+
error_message = "database_insights_mode must be one of: 'standard' (free) or 'advanced'."
326+
}
327+
}
328+
318329
variable "enabled_cloudwatch_logs_exports" {
319330
type = list(string)
320331
default = []

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.0"
7+
version = ">= 5.92.0"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)