AwsSsmProvider v3.0.0 AwsSsmProvider

Populate run time application variables from a file produced by a call to AWS SSM

Link to this section Summary

Functions

Invoked when initializing a config provider.

Loads configuration (typically during system boot).

Link to this section Types

Link to this type

lexed_entry()
lexed_entry() :: {path :: [atom()], value :: term()}

Link to this section Functions

Invoked when initializing a config provider.

A config provider is typically initialized on the machine where the system is assembled and not on the target machine. The c:init/1 callback is useful to verify the arguments given to the provider and prepare the state that will be given to c:load/2.

Furthermore, because the state returned by c:init/1 can be written to text-based config files, it should be restricted only to simple data types, such as integers, strings, atoms, tuples, maps, and lists. Entries such as PIDs, references, and functions cannot be serialized.

Callback implementation for Config.Provider.init/1.

Link to this function

load(initial_configs, config_path)

Loads configuration (typically during system boot).

It receives the current config and the state returned by c:init/1. Then you typically read the extra configuration from an external source and merge it into the received config. Merging should be done with Config.Reader.merge/2, as it performs deep merge. It should return the updated config.

Note that c:load/2 is typically invoked very early in the boot process, therefore if you need to use an application in the provider, it is your responsibility to start it.

Callback implementation for Config.Provider.load/2.