diff --git a/internal/services/network/private_endpoint_resource.go b/internal/services/network/private_endpoint_resource.go index 3620a9e14bbe..d25b08695c4f 100644 --- a/internal/services/network/private_endpoint_resource.go +++ b/internal/services/network/private_endpoint_resource.go @@ -1132,6 +1132,12 @@ func validatePrivateEndpointSettings(d *pluginsdk.ResourceData) error { // normalize the PrivateConnectionId due to the casing change at service side func normalizePrivateConnectionId(privateConnectionId string) string { + // intentionally including the extra segment to handle Redis vs Redis Enterprise (which is within the same RP) + if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.cache/redis/") { + if cacheId, err := redis.ParseRediIDInsensitively(privateConnectionId); err == nil { + privateConnectionId = cacheId.ID() + } + } if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.dbforpostgresql") { if serverId, err := postgresqlServers.ParseServerIDInsensitively(privateConnectionId); err == nil { privateConnectionId = serverId.ID() @@ -1147,11 +1153,6 @@ func normalizePrivateConnectionId(privateConnectionId string) string { privateConnectionId = serverId.ID() } } - if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.redis") { - if cacheId, err := redis.ParseRediIDInsensitively(privateConnectionId); err == nil { - privateConnectionId = cacheId.ID() - } - } if strings.Contains(strings.ToLower(privateConnectionId), "microsoft.signalrservice") { if serviceId, err := signalr.ParseSignalRIDInsensitively(privateConnectionId); err == nil { privateConnectionId = serviceId.ID()