Service wont run with "Environment Variable"

Hi dears,

I have a secure cluster with some services such as Kibana, Metricbeat, APM-server, Elastic Agent and...
In their config.yml I have user/pass for Elasticsearch:

output: elasticsearch
hosts: "[my_hosts]"
username: "elastic"
password: ${ES_PASSWORD}

I defined an environment variable:
export ES_PASSWORD='El@sticpA$$word'

The result of echo $ES_PASSWORD is:
El@sticpA$$word

But when I want to start that service, for instance:
service kibana restart
service doesn't run because of Elasticsearch authentication error...!

I'm using version 7.16.2 for all the services
According to documentations each service can handle "Environment Variable" in the .yml file

Kind regards

I found it...

The correct syntax is $ES_PASSWORD not ${ES_PASSWORD}