Skip to content

Commit dbad321

Browse files
committed
Split endpoint to redis_endpoint_address and memcached_endpoint_address
1 parent d8ffe30 commit dbad321

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

outputs.tf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ output "tags" {
1515
description = "A mapping of tags to assign to the resource."
1616
}
1717

18-
output "endpoint" {
19-
value = var.cluster_enabled ? "" : (var.replication_enabled ? join("", aws_elasticache_replication_group.default.*.primary_endpoint_address) : join("", aws_elasticache_replication_group.cluster.*.configuration_endpoint_address))
20-
description = "Primary endpoint address."
18+
output "redis_endpoint_address" {
19+
value = var.cluster_enabled ? "" : (var.cluster_replication_enabled ? join("", aws_elasticache_replication_group.cluster.*.configuration_endpoint_address) : join("", aws_elasticache_replication_group.default.*.primary_endpoint_address))
20+
description = "Redis endpoint address."
21+
}
22+
23+
output "memcached_endpoint_address" {
24+
value = var.cluster_enabled ? split(":", join("", aws_elasticache_cluster.default.*.configuration_endpoint))[0] : ""
25+
description = "Memcached endpoint address."
2126
}

0 commit comments

Comments
 (0)