Configuration Package Methods and Functions
InitializeKeyVault
InitializeKeyVault initializes the Azure Key Vault by setting up a secret client. Currently, it uses Azure CLI Identity for authentication, and the original Managed Identity code is commented out.
Returns:
KeyVault: The new KeyVault instance.
error: Any errors from the method.
GetSecret
GetSecret retrieves the value of a secret from Azure Key Vault by its name. It initializes the secret client if not already initialized.
Parameters:
ctx: Context for the method.
secretName: Name of the secret.
Returns:
string: Secret value.
error: Any errors from the method.
InitializeAppConfig
InitializeAppConfig initializes the Azure App Configuration client using Azure CLI credentials. Connection-string-based and DefaultAzureCredential-based implementations are commented out for future use.
Returns:
AppConfig: The new AppConfig instance.
error: Any errors from the method.
GetConfigSetting
GetConfigSetting retrieves the configuration setting from Azure App Configuration using the given key.
Parameters:
ctx: Context for the method.
key: Key to used for query.
Returns:
string: Config settings.
error: Any errors from the method.