From 967e42b9dff1e1dfa5b88a2054527fe5e75c0474 Mon Sep 17 00:00:00 2001 From: vijay-veeranki-moj Date: Fri, 13 Mar 2020 16:13:41 +0000 Subject: [PATCH] Revert dynamic "parameter" changes As this change will effect the existing RDS users, who use "force_ssl" and "pending-reboot" --- main.tf | 11 ++++------- variables.tf | 16 ---------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/main.tf b/main.tf index 38022bf..13c77be 100644 --- a/main.tf +++ b/main.tf @@ -127,13 +127,10 @@ resource "aws_db_parameter_group" "custom_parameters" { name = local.identifier family = var.rds_family - dynamic "parameter" { - for_each = var.db_parameter - content { - apply_method = lookup(parameter.value, "apply_method", null) - name = parameter.value.name - value = parameter.value.value - } + parameter { + name = "rds.force_ssl" + value = var.force_ssl ? 1 : 0 + apply_method = var.apply_method } } diff --git a/variables.tf b/variables.tf index b3c0362..f3bbbbd 100644 --- a/variables.tf +++ b/variables.tf @@ -91,22 +91,6 @@ variable "ca_cert_identifier" { default = "rds-ca-2019" } -variable "db_parameter" { - type = list(object({ - apply_method = string - name = string - value = string - })) - default = [ - { - name = "rds.force_ssl" - value = "true" - apply_method = "immediate" - } - ] - description = "A list of DB parameters to apply. Note that parameters may differ from a DB family to another" -} - variable "performance_insights_enabled" { type = bool description = "Enable performance insights for RDS?"