Skip to content

Commit f2f5dc4

Browse files
📦 NEW: Add ssm endpoint value accordingly with cluster mode
1 parent b20400d commit f2f5dc4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎ssm.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ resource "aws_ssm_parameter" "redis_endpoint" {
22
name = "/elasticache/redis/${var.env}-${var.name}/ENDPOINT"
33
description = "Elasticache Redis Endpoint"
44
type = "String"
5-
value = aws_elasticache_replication_group.redis.primary_endpoint_address
5+
value = aws_elasticache_replication_group.redis.cluster_enabled ? aws_elasticache_replication_group.redis.configuration_endpoint_address : aws_elasticache_replication_group.redis.primary_endpoint_address
66
}
7-
87
resource "aws_ssm_parameter" "redis_port" {
98
name = "/elasticache/redis/${var.env}-${var.name}/PORT"
109
description = "Elasticache Redis Port"

0 commit comments

Comments
 (0)