My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

What's the best way to share environment variables between Microservices?

Siddarthan Sarumathi Pandian's photo
Siddarthan Sarumathi Pandian
·Apr 3, 2018

Think of an environment variable like DB_URL which many microservices are using. Let's say that the value of the environment variable could change.

I want this variable to be stored in a single place (say like Consul) and not be stored as a .json or yml file within the repos of the microservices.

What's the best way to go about this?