Move variable creation out of specific resolver implementation
In the initial implementation of the Secrets resolving support, the creation of variables was placed in the specific resolver. This however is a bad design. All secrets will by design be resolved to variables and this means that the variable creation will be repeated over and over again in all existing and future resolvers.
As any duplication, this creates a risk that different duplicated implementation swill get out of sync. For example, we're already discussing a need to make the variable type configurable (file
or normal - !2414 (merged)). After adding such ability the change that defines type of the variable would need to be added to all of the resolvers.
It's better to extract variable's creation to the SecretsResolver
, which is the common point for resolving all secrets. And then make the specific secret type resolvers to return only the resolved value of the secret.