npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

netlify-plugin-gcp-secret-manager-to-dotenv

v0.1.2

Published

Get secrets from Google Cloud Secret Manager at build-time and persist them in a `.env` file during build.

Downloads

5

Readme

netlify-plugin-gcp-secret-manager-to-dotenv

Get secrets from Google Cloud Secret Manager at build-time and persist them in a .env file during build.

Usage

npm install --save-dev netlify-plugin-gcp-secret-manager-to-dotenv

Set an environment variable called GCP_SERVICE_ACCOUNT to the JSON payload of a GCP service account with read access to secrets stored in Secret Manager.

Use the inputs to this plugin to create mappings between secret names and environment variables.

[[plugins]]
package = "netlify-plugin-gcp-secret-manager-to-dotenv"
  [plugins.inputs.variables]
  # This will make the plugin emit the value of the
  # secret named "secret-name" into the env var
  # ENVIRONMENT_VARIABLE_NAME in .env
  ENVIRONMENT_VARIABLE_NAME = "secret-name"

  [plugins.inputs.files]
  # This will write a file with the contents of the
  # "file-secret" secret into a directory generated
  # in the functions dir, and the SOME_SECRET_FILE
  # var will be populated with the path of that file.
  SOME_SECRET_FILE = "file-secret"

  # This will add the "pem" extension to the file
  # generated with the contents of the secret.
  SSL_CERT = { name = "some-cert", extension = "pem" }

  [plugins.inputs]
  # The name of the generated directory for file
  # secrets. Defaults to "secrets".
  secretdir = "secrets"

Unless a file secret is exposed as GOOGLE_APPLICATION_CREDENTIALS, the service account provided in the GCP_SERVICE_ACCOUNT env var will be exposed as a file in that name.