Is it possible to make service variables available to multiple services?

Our application has a number of services which use service variables for access keys, etc., and some of the services share the same keys. For security purposes, we’d like to use service variables to make those keys available only in the services that need them. Is there any way to make a service variable available to multiple services without having to duplicate the variable, which could potentially lead to issues if the two are ever inconsistent?



Hi Adam, unfortunately at the moment there is no official way to do what you are describing. One workaround you could try is to define an environment variable (which is visible to all services), and then create a service variable with the same name with an empty or dummy value for services you didn’t want to access this variable - this would override the environment variable for those services. Not sure if that would be appropriate for your use case?

That would definitely help to avoid inconsistencies. Unfortunately, it would still mean a lot of unnecessary manual (or scripted) variable definitions for the other services. It would be nice to be able to avoid that if possible to keep things simple.

For now, we can create multiple definitions but this would be nice feature to have in the future for sure.