Skip to content

Commit a2a3fac

Browse files
authored
Merge pull request #4 from chrkv/feat-performance-insights
feat: Introduce Performance Insights support
2 parents 3aa7d55 + 1734ae6 commit a2a3fac

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ You may specify `parameter_prefix` and the module will store output values to th
3737
* `enable_slowquery_log` - Enable slowquery log (Default `true`)
3838
* `deletion_protection` - The database can't be deleted (Default `true`)
3939
* `enhanced_monitoring_interval` - Enable Enhanced Monitoring by specifying its interval. Allowed values are 0, 1, 5, 10, 15, 30, 60 (Default `0`)
40+
* `performance_insights_enabled` - Enable Performance Insights (Default `false`)
4041

4142
## Usage
4243

rds.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ resource "aws_db_instance" "default" {
2222
deletion_protection = local.deletion_protection
2323
enabled_cloudwatch_logs_exports = local.logs_set
2424
monitoring_interval = local.enhanced_monitoring_interval
25+
performance_insights_enabled = local.performance_insights_enabled
2526
iam_database_authentication_enabled = true
2627
tags = local.tags
2728
}
@@ -51,6 +52,7 @@ resource "aws_db_instance" "parameterized" {
5152
deletion_protection = local.deletion_protection
5253
enabled_cloudwatch_logs_exports = local.logs_set
5354
monitoring_interval = local.enhanced_monitoring_interval
55+
performance_insights_enabled = local.performance_insights_enabled
5456
iam_database_authentication_enabled = true
5557
tags = local.tags
5658
}

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ variable "enhanced_monitoring_interval" {
5353
description = "Enable Enhanced Monitoring by specifying its interval. Allowed values are 0, 1, 5, 10, 15, 30, 60."
5454
default = 0
5555
}
56+
variable "performance_insights_enabled" {
57+
description = "Enable Performance Insights."
58+
default = false
59+
}
5660
variable "backup_window" {
5761
description = "The daily time range (in UTC) during which automated backups are created if they are enabled."
5862
default = "05:00-07:00"
@@ -129,6 +133,7 @@ locals {
129133
var.enable_slowquery_log ? "slowquery" : "",
130134
])
131135
enhanced_monitoring_interval = var.enhanced_monitoring_interval
136+
performance_insights_enabled = var.performance_insights_enabled
132137
tags = merge({
133138
Name = var.name,
134139
Module = "RDS MySQL"

0 commit comments

Comments
 (0)