From 3fdf37fb6ec90ff466f1fb850e55b373977ecdd5 Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 21 Aug 2018 11:01:04 +0100 Subject: [PATCH] Add option to enable Performance Insights --- README.md | 1 + main.tf | 2 ++ variables.tf | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index fb25c25..2a6ede4 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ resource "aws_rds_cluster_parameter_group" "aurora_cluster_postgres96_parameter_ | monitoring_interval | The interval (seconds) between points when Enhanced Monitoring metrics are collected | string | `0` | no | | name | Name given to DB subnet group | string | - | yes | | password | Master DB password | string | - | yes | +| performance_insights_enabled | Whether to enable Performance Insights | string | `false` | no | | port | The port on which to accept connections | string | `3306` | no | | preferred_backup_window | When to perform DB backups | string | `02:00-03:00` | no | | preferred_maintenance_window | When to perform DB maintenance | string | `sun:05:00-sun:06:00` | no | diff --git a/main.tf b/main.tf index 34df752..08d58af 100644 --- a/main.tf +++ b/main.tf @@ -188,6 +188,7 @@ resource "aws_rds_cluster_instance" "cluster_instance_0" { monitoring_interval = "${var.monitoring_interval}" auto_minor_version_upgrade = "${var.auto_minor_version_upgrade}" promotion_tier = "0" + performance_insights_enabled = "${var.performance_insights_enabled}" tags { envname = "${var.envname}" @@ -213,6 +214,7 @@ resource "aws_rds_cluster_instance" "cluster_instance_n" { monitoring_interval = "${var.monitoring_interval}" auto_minor_version_upgrade = "${var.auto_minor_version_upgrade}" promotion_tier = "${count.index + 1}" + performance_insights_enabled = "${var.performance_insights_enabled}" tags { envname = "${var.envname}" diff --git a/variables.tf b/variables.tf index 2666530..6d604d2 100644 --- a/variables.tf +++ b/variables.tf @@ -217,3 +217,9 @@ variable "replica_scale_out_cooldown" { default = "300" description = "Cooldown in seconds before allowing further scaling operations after a scale out" } + +variable "performance_insights_enabled" { + type = "string" + default = false + description = "Whether to enable Performance Insights" +}