Skip to content
Français

createInfisicalSecretSource

import { createInfisicalSecretSource } from "@elie-laloum/outpost/secrets/infisical";

Create a named-secret reader in one Infisical project, environment and path using a caller-authenticated host client. Fetch only requested names with imports and reference expansion disabled, reveal values explicitly and refuse hidden values. Own neither login nor token renewal; cancellation through fromSecrets stops waiting while an in-flight SDK request may finish.

Complete example and detailed rules.

  • optionsRequired
    InfisicalSecretSourceOptions
    Host client or connection configuration and explicit secret selection for the Infisical adapter.
  • options.clientRequired
    { secrets(): { getSecret(options: GetSecretOptions): Promise<Pick<Secret, "secretValue" | "secretValueHidden">>; }; }
    Caller-authenticated host client exposing secrets().getSecret(), such as InfisicalSDK for cloud or self-hosted instances. The caller selects its site URL and authentication, owns renewal and retains client ownership.
  • options.projectIdRequired
    string
    Explicit Infisical project identifier applied to every selected-name read.
  • options.environmentRequired
    string
    Nonempty Infisical environment slug, such as dev or prod, applied to each selected-name read.
  • options.pathOptional
    string | undefined
    Absolute Infisical folder path without traversal, default /. Imports and reference expansion stay disabled independently of this path.

SecretSource

export declare function createInfisicalSecretSource(
  options: InfisicalSecretSourceOptions,
): SecretSource;