What happens to your Mix configuration when you create a release

I've been thinking about writing a similar utility, but with plugins that could pull config from remote sources, e.g. Hashicorp's Consul/Vault, or etcd from CoreOS.

Rather than setting up your application config in your Mix config, you'd specify what application/key you're setting, what plugin to use and the values to use for that plugin, in a format something like:

{{<application>, <key>}, {<plugin>, <args kw>}}

e.g.:

config :configurator, :foo_bar, {{:foo, :bar}, {Configurator.System, env: "FOO_BAR"}}

I wrote a bit of code, got the System plugin working, and started on a Vault one when I realised I'd want to use the result of a System one to get a token, so I started on making them be able to depend on each other (building a DAG and having them subscribe to each other):

config :configurator, :configurator_vault_token, {{:configurator_vault, :token}, {Configurator.System, env: "VAULT_TOKEN"}} config :configurator, :foo_bar, {{:foo, :bar}, {Configurator.Vault, path: "/secrets/foo/bar"}, depends_on: :configurator_vault_token}

... but then my holidays ran out and I had to go back to writing shitty CSV importers for my day job.

I'd be keen to know if there's interest, though, it's something I'd like to work on.

/r/elixir Thread Parent Link - erlang-solutions.com