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, [""])