From 51aa35b1c39088a34fc97968acb2858f444907c2 Mon Sep 17 00:00:00 2001 From: oycyc Date: Mon, 16 Dec 2024 13:46:05 -0500 Subject: [PATCH 1/2] fix: reserved instances, aurora rds specifics --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 8ceda0e..cfce003 100644 --- a/main.tf +++ b/main.tf @@ -100,7 +100,7 @@ data "aws_rds_reserved_instance_offering" "default" { count = local.use_reserved_instances ? 1 : 0 db_instance_class = var.instance_type duration = var.rds_ri_duration - multi_az = local.cluster_instance_count > 1 + multi_az = startswith(local.reserved_instance_engine, "aurora") ? false : local.cluster_instance_count > 1 # Aurora options never available for multi AZ for Reserved Instances. Single Reserved Instances rates still apply. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithReservedDBInstances.html offering_type = var.rds_ri_offering_type product_description = local.reserved_instance_engine } From f957a43a5ae3b415511b0799c1449c665b58b436 Mon Sep 17 00:00:00 2001 From: oycyc Date: Mon, 16 Dec 2024 18:25:26 -0500 Subject: [PATCH 2/2] terraformt fmt --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index cfce003..8f8c60d 100644 --- a/main.tf +++ b/main.tf @@ -100,7 +100,7 @@ data "aws_rds_reserved_instance_offering" "default" { count = local.use_reserved_instances ? 1 : 0 db_instance_class = var.instance_type duration = var.rds_ri_duration - multi_az = startswith(local.reserved_instance_engine, "aurora") ? false : local.cluster_instance_count > 1 # Aurora options never available for multi AZ for Reserved Instances. Single Reserved Instances rates still apply. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithReservedDBInstances.html + multi_az = startswith(local.reserved_instance_engine, "aurora") ? false : local.cluster_instance_count > 1 # Aurora options never available for multi AZ for Reserved Instances. Single Reserved Instances rates still apply. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithReservedDBInstances.html offering_type = var.rds_ri_offering_type product_description = local.reserved_instance_engine }