Serverless and Google Cloud KMS (key management)


#1

Hi guys,

Basically I use serverless framework for a function that allows me to send/receive emails through mailgun.
For this I have a config.js file set up in my serverless folder.
This config.js contains all my API keys etc for my “mailgun” function.

I want to use Google Cloud KMS to encrypt the resource “config.js”, and that works.
But “sls deploy” obviously does not decrypt my config.js. It throws me a resource/syntax error…

[https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-secrets-credentials#using_the_encrypted_variable_in_build_requests]

Any solutions/ideas how I can make Google KMS work for my config.js file in my serverless setup?