UNPKG

@enspirit/emb

Version:

A replacement for our Makefile-for-monorepos

47 lines (46 loc) 1.22 kB
import { VaultAuthConfig } from '../../secrets/providers/VaultProvider.js'; import { AbstractPlugin } from './plugin.js'; /** * Configuration for the Vault plugin in .emb.yml */ export interface VaultPluginConfig { /** Vault server address. Defaults to VAULT_ADDR env var. */ address?: string; /** Authentication configuration */ auth?: VaultAuthConfig; /** Vault namespace. Defaults to VAULT_NAMESPACE env var. */ namespace?: string; } /** * Plugin that integrates HashiCorp Vault with EMB. * * Usage in .emb.yml: * ```yaml * plugins: * - name: vault * config: * address: ${env:VAULT_ADDR:-http://localhost:8200} * auth: * method: token * token: ${env:VAULT_TOKEN} * ``` * * Then use secrets in templates: * ```yaml * env: * DB_PASSWORD: ${vault:secret/myapp/db#password} * ``` */ export declare class VaultPlugin extends AbstractPlugin<VaultPluginConfig> { static name: string; private provider; init(): Promise<void>; /** * Resolve the plugin configuration, filling in defaults from env vars. */ private resolveConfig; /** * Resolve authentication configuration. */ private resolveAuth; }