Google Secret Manager


This guide will show you how to use Google Secret Manager to manage configurations via the Configu interface. Learn about the concept of stores.

Working with the store

CLI installation

1curl | sh

CLI usage

Create the store URI as follows:

gcp-secret-manager://[path to keyfile][?projectId=]

CLI Upsert

configu upsert --set "example" --schema "example.cfgu.json" --store "gcp-secret-manager:// service-account.json?projectId=my-project" --config "FOO=value" --config "BAR=bar"

CLI Export

configu export --set "example" --schema "example.cfgu.json" --store "gcp-secret-manager:// service-account.json?projectId=my-project" --format "Dotenv"

CLI Delete

configu delete --set "example" --schema "example.cfgu.json" --store --store "gcp-secret-manager:// service-account.json?projectId=my-project"

SDK installation

Install the node.js SDK

// * Using yarn
yarn add @configu/node
// * Using npm
npm install --save @configu/node

SDK usage

import { Cfgu, Set, UpsertCommand, EvalCommand, DeleteCommand, GcpSecretManagerStore} from "@configu/node";
import path from "path";

const store = new GcpSecretManagerStore({ keyFile: path.resolve(__dirname, "./service-account.json"), projectId });
const schema = new Cfgu(path.resolve(__dirname, "./example.cfgu.json"));
const set = new Set("dev");

// * Example upsert command
await new UpsertCommand({ store, set, schema, configs: [{ key: "foo", value: "bar" }] }).run();

// * Example eval command
const configs = await new EvalCommand({ store, set, schema }).run();

// * Example delete command
await new DeleteCommand({ store, set, schema }).run();


To reference a value from this store, use the following reference format: