ExAzureCore. Config
(ex_azure_core v0.3.0)
Copy Markdown
Configuration management for ExAzureCore.
Builds configuration by merging from multiple sources (lowest to highest priority):
- Service defaults from
ExAzureCore.Config.Defaults - Global config from
config :ex_azure_core - Service-specific config from
config :ex_azure_core, :service_name - Per-request overrides from
ExAzureCore.request(op, overrides)
Application Configuration
# config/config.exs
# Global defaults (apply to all services)
config :ex_azure_core,
timeout: 30_000,
max_retries: 3
# Service-specific configuration
config :ex_azure_core, :storage,
account: {:system, "AZURE_STORAGE_ACCOUNT"},
credential: my_named_key_credential
config :ex_azure_core, :keyvault,
vault_name: "my-vault",
credential: :azure_default_credential # TokenServer nameRuntime Value Resolution
Values can be resolved at runtime using {:system, "ENV_VAR"} tuples:
config :ex_azure_core, :storage,
account: {:system, "AZURE_STORAGE_ACCOUNT"},
credential: {:system, "AZURE_STORAGE_KEY"}Credential Types
The :credential config accepts:
AzureKeyCredentialstruct - Uses ApiKey pluginAzureSasCredentialstruct - Uses SasToken pluginAzureNamedKeyCredentialstruct - Uses SharedKey plugin- Atom (e.g.,
:my_credential) - Uses BearerToken plugin with TokenServer
Summary
Functions
Builds complete configuration for a service operation.