0.0.9 • Published 2 years ago

gae-env-loader v0.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

What it does

Load the latest version of all secrets in GCP Secret Manager into process.env for a given GCP Project ID.

Requirements

  • gcloud SDK installed
  • gcloud should be initialized (look for gcloud init)
  • gcloud should be authenticated (look for gcloud auth)
  • GCP Project ID should be available at process.env.GOOGLE_CLOUD_PROJECT, this is done automatically by Google App Engine at runtime.

Installation

$ npm i gae-env-loader  

Usage

import { loadSecrets } from "gae-env-loader";
.
.
.
  await loadSecrets(prioritizeLocal);
.
.
.

prioritizeLocal: Optional parameter, defaults to true. If process.env.FOO is already set, ignore the secret from GCP Cloud Manager. You can disable this behavior and override local env variables by setting prioritizeLocal as false.

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago