Encrypt a secret via KMS and prints the base64-encoded cipher-text to the console

db_config_encrypt_secret(secret, key)

Arguments

secret

string of the actual secret to be encrypted/stored

key

Amazon KMS key to be used for the encryption

Value

base64-encoded cipher-text

Note

You need to have access to the related KMS key to be able to decrypt cipher-text

Examples

if (FALSE) { encrypt_secret('secret sentence I want to store in the YAML file') }