vault_config_provider v0.1.0 VaultConfigProvider

VaultConfigProvider is a

This provider expects a path to a config file to load during boot as an argument:

set config_providers: [
  {Mix.Releases.Config.Providers.Elixir, ["${RELEASE_ROOT_DIR}/config.exs"]},
  {VaultConfigProvider}
]

The above configuration goes in a release or environment definition in rel/congfig.exs, and will result in the given path being expanded during boot, and evaluated using Mix.Config.

Any value set as "secret:secret/foo/bar key=baz" or [path: "secret/foo/bar", key: "baz"] will be resolved from Vault.

This provider is based on Mix.Releases.Config.Providers.Elixir in Distillery 2.0.9

This provider exects the passed config file to contain configuration for Vault describing authentication parameters:

config :vaultex,

auth: {:kubernetes, %{jwt: File.read!("/tmp/token"), role: "my_role"}}

config :vaultex,

auth: {:token, {"root"}}

Link to this section Summary

Functions

Called when the provider is initialized

Link to this section Functions

Called when the provider is initialized.

Providers are invoked pre-boot, in a dedicated VM, with all application code loaded, and kernel, stdlib, compiler, and elixir applications started. Providers must use this callback to push configuration into the application environment, which will be persisted to a final sys.config for the release itself.

The arguments given to init/1 are the same as given in the config_providers setting in your release configuration file.

Callback implementation for Mix.Releases.Config.Provider.init/1.