No commit activity in last 3 years
No release in over 3 years
Load Google Cloud Secrets into ENV
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Google Cloud ENV Secrets

Load Google Cloud Secrets into ENV.

Installation

Add this line to your application's Gemfile:

gem 'google_cloud_env_secrets'

And then execute:

$ bundle

Or install it yourself as:

$ gem install google_cloud_env_secrets

Usage

Configure this gem with environment vars:

Variable Description
GOOGLE_APPLICATION_CREDENTIALS Google Application Credentials, path or data (not base64 encoded).
GOOGLE_PROJECT Google project
GOOGLE_SECRETS_PREFIX Only load secrets that start with given prefix.
GOOGLE_SECRETS_OVERLOAD Replace existing ENV vars with secret's value. Default true.

The GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_PROJECT variables are both optional. If not given, we will detect them automatically, if run on Google Cloud.

Google Secrets are available after the before_configuration hook. You can call GoogleCloudEnvSecrets.load if you need the ENV secrets sooner than that.

See docs, too.

Required IAM Roles

Secret Manager Secret Accessor
Secret Manager Viewer