From 44243c772fe82665d77967c89f3e0f8577d65fe7 Mon Sep 17 00:00:00 2001 From: Max Williams Date: Fri, 31 Jan 2020 15:04:29 +0100 Subject: [PATCH] Fix error about applying windows to instances (#12) --- main.tf | 4 ++-- variables.tf | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index ba011be..bcc7b62 100644 --- a/main.tf +++ b/main.tf @@ -63,8 +63,8 @@ resource "aws_rds_cluster_instance" "instance" { publicly_accessible = var.publicly_accessible db_subnet_group_name = aws_db_subnet_group.main[0].name db_parameter_group_name = var.db_parameter_group_name - preferred_backup_window = var.preferred_backup_window - preferred_maintenance_window = var.preferred_maintenance_window + preferred_backup_window = var.preferred_backup_window_instance + preferred_maintenance_window = var.preferred_maintenance_window_instance apply_immediately = var.apply_immediately monitoring_role_arn = join("", aws_iam_role.rds_enhanced_monitoring.*.arn) monitoring_interval = var.monitoring_interval diff --git a/variables.tf b/variables.tf index 69621cb..f40944c 100644 --- a/variables.tf +++ b/variables.tf @@ -85,15 +85,25 @@ variable "backup_retention_period" { } variable "preferred_backup_window" { - description = "When to perform DB backups" + description = "When to perform DB backups for the cluster" default = "02:00-03:00" } variable "preferred_maintenance_window" { - description = "When to perform DB maintenance" + description = "When to perform DB maintenance for the cluster" default = "sun:05:00-sun:06:00" } +variable "preferred_backup_window_instance" { + description = "When to perform DB backups for instances" + default = "" +} + +variable "preferred_maintenance_window_instance" { + description = "When to perform DB maintenance for instances" + default = "" +} + variable "port" { description = "The port on which to accept connections" default = ""