Skip to content
Français

createAzureSecretSource

import { createAzureSecretSource } from "@elie-laloum/outpost/secrets/azure";

Create an Azure Key Vault reader using the caller’s host SDK client and credentials. Map selected environment names to vault names and optional versions, pass cancellation to getSecret and return text values. The caller owns the client and the vault endpoint.

Complete example and detailed rules.

  • optionsRequired
    AzureSecretSourceOptions
    Host client or connection configuration and explicit secret selection for the Azure adapter.
  • options.clientRequired
    Pick<SecretClient, "getSecret">
    Caller-owned Azure SecretClient with the chosen vault URL and host credentials. Only getSecret is used, with abortSignal; client ownership stays with the caller.
  • options.secretsRequired
    Readonly<Record<string, AzureSecretReference>>
    Mapping from environment identifiers to vault names and optional versions, copied at construction and checked for the full selection before reading.

SecretSource

export declare function createAzureSecretSource(
  options: AzureSecretSourceOptions,
): SecretSource;