Skip to content

Commit

Permalink
feat: Introduce Performance Insights support
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkv committed Oct 16, 2023
1 parent 3aa7d55 commit 1734ae6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ You may specify `parameter_prefix` and the module will store output values to th
* `enable_slowquery_log` - Enable slowquery log (Default `true`)
* `deletion_protection` - The database can't be deleted (Default `true`)
* `enhanced_monitoring_interval` - Enable Enhanced Monitoring by specifying its interval. Allowed values are 0, 1, 5, 10, 15, 30, 60 (Default `0`)
* `performance_insights_enabled` - Enable Performance Insights (Default `false`)

## Usage

Expand Down
2 changes: 2 additions & 0 deletions rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "aws_db_instance" "default" {
deletion_protection = local.deletion_protection
enabled_cloudwatch_logs_exports = local.logs_set
monitoring_interval = local.enhanced_monitoring_interval
performance_insights_enabled = local.performance_insights_enabled
iam_database_authentication_enabled = true
tags = local.tags
}
Expand Down Expand Up @@ -51,6 +52,7 @@ resource "aws_db_instance" "parameterized" {
deletion_protection = local.deletion_protection
enabled_cloudwatch_logs_exports = local.logs_set
monitoring_interval = local.enhanced_monitoring_interval
performance_insights_enabled = local.performance_insights_enabled
iam_database_authentication_enabled = true
tags = local.tags
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ variable "enhanced_monitoring_interval" {
description = "Enable Enhanced Monitoring by specifying its interval. Allowed values are 0, 1, 5, 10, 15, 30, 60."
default = 0
}
variable "performance_insights_enabled" {
description = "Enable Performance Insights."
default = false
}
variable "backup_window" {
description = "The daily time range (in UTC) during which automated backups are created if they are enabled."
default = "05:00-07:00"
Expand Down Expand Up @@ -129,6 +133,7 @@ locals {
var.enable_slowquery_log ? "slowquery" : "",
])
enhanced_monitoring_interval = var.enhanced_monitoring_interval
performance_insights_enabled = var.performance_insights_enabled
tags = merge({
Name = var.name,
Module = "RDS MySQL"
Expand Down

0 comments on commit 1734ae6

Please sign in to comment.