A cache and config merger for AWS Secrets. Give it a secret name, and an OTP application name and it'll resolve the resultant configuration.
Set your AWS credentials as specified by ex_aws
For example, let's say you've configured :my_app
as such
config :my_app,
best_yuru: :yui
And you have in AWS a secret named my_secret
, that looks like
{"database": {"username": "user", "password": "heh"}}
SecretsCache can resolve this as follows:
SecretsCache.get_config(:my_app, "my_secret")
[database: [username: "user", password: "heh"], best_yuru: :yui]
If available in Hex, the package can be installed
by adding secrets_cache
to your list of dependencies in mix.exs
:
def deps do
[
{:secrets_cache, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/secrets_cache.