Assuming that you already use the platform.sh Config-Reader with composer.json like that:
...
"require": {
...
"platformsh/config-reader": "^2.4",
...
}
...platform ssh
# then on the platform-instance
drush core-cliThen in this Shell from drush core-cli
$platformsh = new Platformsh\ConfigReader\Config();
$relationship = $platformsh->credentials('elasticsearch');If everything works fine it leads to something like that:
[
"username" => null,
"fragment" => null,
"ip" => "169.254.160.252",
"cluster" => "oo4im7ibtndbq-pr-304-hnfhj7a",
"host" => "elasticsearch.internal",
"path" => null,
"query" => [],
"password" => null,
"port" => 9200,
"host_mapped" => false,
"service" => "elasticsearch",
"hostname" => "1234xyz.elasticsearch.service._.de-2.platformsh.site",
"epoch" => 0,
"instance_ips" => [
"248.5.113.6",
],
"rel" => "elasticsearch",
"scheme" => "http",
"type" => "elasticsearch:7.10",
"public" => false,
]