From 266d06cdbea22be82a92a2d15d113cb2411078e7 Mon Sep 17 00:00:00 2001 From: Slesa Adhikari Date: Mon, 9 Oct 2023 13:16:08 -0500 Subject: [PATCH] Add `sync-env.sh` --- scripts/sync-env.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 scripts/sync-env.sh diff --git a/scripts/sync-env.sh b/scripts/sync-env.sh new file mode 100755 index 0000000..98c4eca --- /dev/null +++ b/scripts/sync-env.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Use this script to load environment variables for a deployment from AWS Secrets + +echo Loading environment secrets from $1 +aws secretsmanager get-secret-value --secret-id $1 --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' > .env