chore: deploy prod to aws

This commit is contained in:
2026-01-21 18:00:32 -08:00
parent 8bce0bd957
commit cfd2e0d2c2
4 changed files with 181 additions and 7 deletions

27
scripts/import-env.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
PREFIX="/ghostv2"
REGION="ca-central-1"
WRITE="$1"
while getopts "w" opt; do
case $opt in
w) WRITE=true ;;
*) echo "Usage $0 [-w]" && exit 1 ;;
esac
done
while IFS='=' read -r key value; do
[[ -z "$key" || "$key" =~ ^# ]] && continue
echo "Creating parameter: $PREFIX/$key"
if [[ "$WRITE" == "true" ]]; then
aws ssm put-parameter \
--name "$PREFIX/$key" \
--value "$value" \
--type SecureString \
--overwrite \
--region "$REGION" > /dev/null
fi
done < api/.env