1.3.4 • Published 5 years ago
serverless-vault-custom-plugin v1.3.4
Installation
npm i -E serverless-vault-custom-plugin
Features
- Auth with roleId or use token
- Variable Resolver
- Fetch and set aws credentials
- Command Line Support
Usage
plugins:
- serverless-vault-custom-plugin
custom:
secrets:
aws: 'path/to/secret:data.value'
otherPluginSecret: 'path/to/secret:response.path.to.object.property'
vault:
host: vault.your.corp.com
debugQuery: false # optional, log axios http request
auth:
# option 1
roleId: 'xxx-xxxx-xxxxx-xx' # optional
secretId: 'xx-xxx-xx-x-xxx' # optional
# option 2
useToken: "" # optional, force request to use this token
aws: # optional tag
setEnvVars: true # set environment aws creds vars
secretPath: '/mi/project/dev/aws/creds' # path to aws secret creds
# HOW TO RESOLVE ANOTHER SECRET
#otherPluginConf:
#secret: ${vault:${self:custom.secrets.otherPluginSecret}}
Command Line Support
$ sls vault --help
$ sls vault get --secret /relative/path/to/secret
$ sls vault del --secret /relative/path/to/secret
$ sls vault set --secret /relative/path/to/secret --jsondata '{"value":"some_token_or_cred"}'