heroku-google-application-credentials-buildpack

by elishaterada

README.md

Deprecated — no longer maintained

This buildpack is retired. Do not use it for new projects or new deployments. No further updates, bug fixes, or security fixes are planned. The source remains available for existing deployments and historical reference.

heroku-google-application-credentials-buildpack

Generates a Google credential file based on Heroku Config Vars.

This is useful when using a package such as @google-cloud/storage which loads credentials from a file instead of an environmental variable.

Usage

  1. Create Config Vars key GOOGLE_CREDENTIALS and paste the content of service account credential JSON file as is.
  2. Create a key under Config Vars GOOGLE_APPLICATION_CREDENTIALS and set a value as google-credentials.json.

The script with generate a file called google-credentials.json which holds the key from the step #1 above.

CLI Installation

For new applications:

$ heroku create --buildpack https://github.com/elishaterada/heroku-google-application-credentials-buildpack.git

For existing applications:

$ heroku buildpacks:set https://github.com/elishaterada/heroku-google-application-credentials-buildpack.git -a YOUR_APP_NAME