From 163d3c2a1c5460e60af1da464bc3c03b2418d3df Mon Sep 17 00:00:00 2001 From: Frank <639906+syphernl@users.noreply.github.com> Date: Tue, 23 Nov 2021 21:12:41 +0100 Subject: [PATCH] fix: prevent creating empty replicas record (#126) * fix: prevent creating empty readers record * fmt * Auto Format Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index a0640da9..eaa2620b 100644 --- a/main.tf +++ b/main.tf @@ -328,7 +328,7 @@ module "dns_replicas" { source = "cloudposse/route53-cluster-hostname/aws" version = "0.12.2" - enabled = local.enabled && length(var.zone_id) > 0 && local.is_serverless + enabled = local.enabled && length(var.zone_id) > 0 && local.is_serverless && local.cluster_instance_count > 0 dns_name = local.reader_dns_name zone_id = var.zone_id records = coalescelist(aws_rds_cluster.primary.*.reader_endpoint, aws_rds_cluster.secondary.*.reader_endpoint, [""])