https://github.com/doitintl/secret-manager-nodejs-example
https://github.com/doitintl/secret-manager-nodejs-example
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/doitintl/secret-manager-nodejs-example
- Owner: doitintl
- Created: 2020-02-17T16:30:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:33:24.000Z (over 3 years ago)
- Last Synced: 2025-09-30T12:50:45.545Z (10 months ago)
- Language: JavaScript
- Size: 1.49 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# secret-manager-nodejs-example
git clone https://github.com/doitintl/secret-manager-nodejs-example.git
npm i
node --version
v13.6.0
npm --version
6.13.4
# create a secret in GCP secret manager
Under Security / Secret Manager from the GCP Console

Fill in the details and click create

# Create a Service Account to access the secret
Create Service Account

Assign Secret Manager Secret Accessor
*** ALSO ASSIGN STORAGE OBJECT VIEWER

# Dockerize the script
gcloud auth configure-docker
docker build . -t us.gcr.io/andy-playground-264516/nodejs-demo:latest
docker push us.gcr.io/andy-playground-264516/nodejs-demo:latest
# Create New Compute Instance with container source
using same region for the instance as the secret was created in

