@roit/roit-secret-manager
TypeScript icon, indicating that this package has built-in type declarations

2.7.2 • Public • Published

ROIT Secret Manager

Installation

> npm i @roit/roit-secret-manager

Permission

We need to grant permissions to the service account to be able to access Secret Manager

Usage

In the env.yaml file add the secretManager.projectId attribute, with the name do project gcp:

dev:
  secretManager:
    projectId: project-gcp
import { getSecretVersion } from "@roit/roit-secret-manager";

const secret = await createAndAccessSecret('secret-id', 'data')
const secret = await addSecretVersion('secret-id', 'data')
const secret = await getSecretVersion('secret-id', '1')
const secret = await disableSecretVersion('secret-id', '1')

Functions

Name Description
createAndAccessSecret create secret and version
getSecretVersion returns data of the informed version
disableSecretVersion disable version of the given secret
addSecretVersion add a new version to the existing secret

Readme

Keywords

none

Package Sidebar

Install

npm i @roit/roit-secret-manager

Weekly Downloads

18

Version

2.7.2

License

none

Unpacked Size

63.7 kB

Total Files

18

Last publish

Collaborators

  • williampaulo
  • lucasmoreira
  • roitjoaovitor
  • jeremias.silva
  • karlaugust1
  • yucky4
  • tiagodev
  • jenkins.roit
  • tiago.gois
  • evelin.iurko.roit