pub trait ProviderInitConfig: Send + Sync {
// Required methods
fn get_provider_id(&self) -> &str;
fn get_config(&self) -> &HashMap<String, String>;
fn get_secrets(&self) -> &HashMap<String, SecretValue>;
}
Expand description
Configuration object is made available when a provider is started, to assist in init
This trait exists to both obscure the underlying implementation and control what information is made available
Required Methods§
sourcefn get_provider_id(&self) -> &str
fn get_provider_id(&self) -> &str
Get host-configured provider ID.
This value may not be knowable to the provider at build time but must be known by runtime.
sourcefn get_config(&self) -> &HashMap<String, String>
fn get_config(&self) -> &HashMap<String, String>
Retrieve the configuration for the provider available at initialization time.
This normally consists of named configuration that were set for the provider, merged, and received from the host before the provider has started initialization.
sourcefn get_secrets(&self) -> &HashMap<String, SecretValue>
fn get_secrets(&self) -> &HashMap<String, SecretValue>
Retrieve the secrets for the provider available at initialization time.
The return value is a map of secret names to their values and should be treated as sensitive information, avoiding logging.