Replace the environment variable values which describe a secret into Google Cloud secret manager with the secret plain text value
Example of use here
Already compiled executable are available here
The default format of the environment variable follow this pattern:
<prefix><secret_name>[#<version>]
Where:
- prefix is the environment variable identifier for the secret to load. It's required and
secret:
by default It's customizable (see bellow) - secret_name is the name of your secret in secret manager. Required
- version is the version of the secret. One
#
is required before specifing the version. It's optional. If missing, the latest version is loaded
Example of values of environment variable:
secret:mySecret#2
It's possible to customize the prefix defined in the environment variable by setting a flag in the call
- prefix of the secret defined in the environment variables, default is
secret:
Example
secret-loader -prefix super-secret:
For now, the service recover only the secret in the current project.
Open a feature request is you need to get secret from external project
This library is licensed under Apache 2.0. Full license text is available in LICENSE.