gcp-secrets
Version, currently master branch1 version
- master branchlatestFeb 12, 2018
github.com/sam0x17/gcp-secrets
Manages the loading of production-only secrets within the Google Cloud Platform via the cloud metadata service. This is the closest thing GCP has to server-side environment variables. Available for Node.js, Crystal, Node.js and PHP.
Installation
# Add this to your shard.yml
dependencies:
gcp-secrets:
github: sam0x17/gcp-secrets
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.24.1- License
- MIT
- Author
- Sam Johnson
Dependencies
This version declares no dependencies.
README
gcp-secrets (WIP)
This is a gem/shard/package/script for Ruby/Crystal/Node.js/PHP respectively that allows the loading of secure production-only secrets in Google Cloud Platform. Secrets are stored using the Cloud Metadata Service and are automatically loaded as environment variables. The goal of this project is to make loading secrets as easy in GCP as it is in AWS.

Ruby
Add the following to your Gemfile:
gem 'gcp-secrets'
Run bundle install in the root of your project.
Add the following to your application.rb file if using Rails or otherwise
add it somewhere that will run before any code that might need a production
secret or environment variable:
require 'gcp-secrets'
That's it, you're done. You can manage your production-only secrets from
https://console.cloud.google.com/compute/metadata. All metadata variables
will be made accessible automatically via the ENV hash.
Crystal
Add this to your application's shard.yml:
dependencies:
gcp-secrets:
github: sam0x17/gcp-secrets
Run shards install
Add the following somewhere in your app so that it will run before everything that might need to access a production secret or environment variable:
require "gcp-secrets"
That's it, you're done. You can manage your production-only secrets from
https://console.cloud.google.com/compute/metadata. All metadata variables
will be made accessible automatically via the ENV hash.
Contributing
- Fork it ( https://github.com/[your-github-name]/gcp-secrets/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- [sam0x17] Sam Johnson - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 12, 2018
- Crystal
0.24.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sam0x17/gcp-secrets
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1