@1mill/sops
npm install @1mill/sops
const { Sops } = require('@1mill/sops')
const sops = new Sops({})
exports.handler = async (cloudevent, ctx) => {
ctx.callbackWaitsForEmptyEventLoop = false
const allMySecrets = await sops.decrypt()
const aSingleSecret = await sops.decrypt('my secret name')
return {
allMySecrets,
aSingleSecret,
}
}
| Required | Default | Notes |
---|
accessKeyId | yes | process.env.MILLSOPSAWSACCESSKEY_ID | |
endpoint | | process.env.MILLSOPSAWS_ENDPOINT | Good for local development environment when using Localstack (or other AWS simulators) |
file | | process.env.MILLSOPSFILE || process.env.NODE_ENV === 'production' ? 'prod.secrets.sops.json' : 'dev.secrets.sops.json' | |
region | yes | process.env.MILLSOPSAWS_REGION | |
secretAccessKey | yes | process.env.MILLSOPSAWSSECRETACCESS_KEY | |
@1mill/sops
npm install @1mill/sops
const { Sops } = require('@1mill/sops')
const sops = new Sops({})
exports.handler = async (cloudevent, ctx) => {
ctx.callbackWaitsForEmptyEventLoop = false
const allMySecrets = await sops.decrypt()
const aSingleSecret = await sops.decrypt('my secret name')
return {
allMySecrets,
aSingleSecret,
}
}
| Required | Default | Notes |
---|
accessKeyId | yes | process.env.MILLSOPSAWSACCESSKEY_ID | |
endpoint | | process.env.MILLSOPSAWS_ENDPOINT | Good for local development environment when using Localstack (or other AWS simulators) |
file | | process.env.MILLSOPSFILE || process.env.NODE_ENV === 'production' ? 'prod.secrets.sops.json' : 'dev.secrets.sops.json' | |
region | yes | process.env.MILLSOPSAWS_REGION | |
secretAccessKey | yes | process.env.MILLSOPSAWSSECRETACCESS_KEY | |