-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(support for kms encrypted environment vars): wip
BREAKING CHANGE: renamed env vars to indicate encryption
- Loading branch information
Showing
30 changed files
with
403 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
display_usage() { | ||
echo "Please supply env var name and value to encrypt" | ||
echo "eg. ./encrypt.sh GTM_CRYPT_MY_VARIABLE supers3cret" | ||
} | ||
|
||
if [ $# -eq 0 ]; then | ||
display_usage | ||
exit 1 | ||
fi | ||
|
||
export $(cat .env | grep -v ^# | xargs) | ||
node ./node_modules/serverless/bin/serverless encrypt -k $GTM_AWS_KMS_KEY_ID -n $1 -v $2 | ||
# todo add encrypted values to .env from kms secrets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
secrets: | ||
GTM_CRYPT_GITHUB_TOKEN: AQICAHhK1adeaGaap/XxRtXdFB/VkZT3XeQtDEMkVYvemdBEiQEJcnivPX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qzLjhD+nMQHVL2WGWEfQSa0A== | ||
keyArn: 'arn:aws:kms:ap-southeast-2:347186442473:key/f7caff09-20ff-4698-b6a5-5ebe3ccf8556' |
Oops, something went wrong.