@secret-kernel/provider-gcp-parameter-manager
v0.1.0-alpha.7
Published
GCP Parameter Manager provider for Secret Kernel.
Maintainers
Readme
@secret-kernel/provider-gcp-parameter-manager
GCP Parameter Manager provider for Secret Kernel.
npm install @secret-kernel/contracts @secret-kernel/provider-gcp-parameter-managerUsage
import { createGcpParameterManagerClient } from '@secret-kernel/provider-gcp-parameter-manager';
const client = createGcpParameterManagerClient(
{
env: 'prod',
prefix: 'app',
},
{
projectId: 'my-project',
location: 'global',
},
);
const secret = await client.getSecret('database/password');The provider reads the latest parameter version from GCP Parameter Manager through the shared Secret Kernel client contract.
Options
projectId: GCP project ID. Required;undefined,nullor blank text throwsSecretKernelConfigurationError.location: GCP Parameter Manager location. Default:global. Passingundefined,nullor blank text throwsSecretKernelConfigurationError.credentials: explicit Google credentials. When omitted, the Google SDK default authentication flow is used.client: custom Parameter Manager-compatible client.clientOptions: extra options passed to the Google SDK client.physicalNameSeparator: separator used when mapping logical/path segments to the GCP parameter ID. Supported values are_and-. Default:_.resolveName: custom logical-to-physical name resolver.
By default, the provider maps the logical Secret Kernel name to a GCP parameter ID by removing leading / characters and replacing remaining / separators with _.
Example: /dev/app/database becomes dev_app_database.
With physicalNameSeparator: '-', /dev/app/database becomes dev-app-database.
