diff --git a/main.tf b/main.tf index b4c9e1f..23c15c9 100644 --- a/main.tf +++ b/main.tf @@ -115,8 +115,8 @@ locals { reader_endpoint_serverless = try(aws_elasticache_serverless_cache.default[0].reader_endpoint[0].address, null) reader_endpoint_cluster = try(aws_elasticache_replication_group.default[0].reader_endpoint_address, null) reader_endpoint_instance = try(aws_elasticache_replication_group.default[0].reader_endpoint_address, null) - # Use the serverless reader endpoint if serverless mode is enabled, otherwise use the cluster reader endpoint, otherwise use the instance reader endpoint - reader_endpoint_address = coalesce(local.reader_endpoint_serverless, local.reader_endpoint_cluster, local.reader_endpoint_instance) + # Use the serverless reader endpoint if serverless mode is enabled, otherwise use the cluster reader endpoint, otherwise use the instance reader endpoint, otherwise use the endpoint address + reader_endpoint_address = coalesce(local.reader_endpoint_serverless, local.reader_endpoint_cluster, local.reader_endpoint_instance, local.endpoint_address) } resource "aws_elasticache_subnet_group" "default" {