Skip to content

Commit e60c065

Browse files
committed
adds support for configuring performance insights
1 parent 0a0e767 commit e60c065

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ resource "aws_db_instance" "rds_postgres" {
6565
copy_tags_to_snapshot = var.copy_tags_to_snapshot
6666
tags = local.effective_tags
6767

68+
# Performance Insights
69+
performance_insights_enabled = var.performance_insights_enabled
70+
performance_insights_retention_period = var.performance_insights_enabled ? var.performance_insights_retention_period : null
71+
6872
lifecycle {
6973
ignore_changes = [password]
7074
}

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,15 @@ variable "multi_az" {
161161
type = bool
162162
description = "Specifies if the RDS instance is multi-AZ."
163163
}
164+
165+
variable "performance_insights_enabled" {
166+
default = false
167+
type = bool
168+
description = "Specifies whether Performance Insights are enabled."
169+
}
170+
171+
variable "performance_insights_retention_period" {
172+
default = 7
173+
type = number
174+
description = "The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years)."
175+
}

0 commit comments

Comments
 (0)