Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created September 18, 2018 18:42
Show Gist options
  • Save rms1000watt/ad931626cb3a397de3eb2b4a7c65f13b to your computer and use it in GitHub Desktop.
Save rms1000watt/ad931626cb3a397de3eb2b4a7c65f13b to your computer and use it in GitHub Desktop.
Provision SSM via bash script
#!/usr/bin/env bash
set -e
echo "This script will provision AWS SSM that will be used for deployments.."
configure() {
echo
read -rp "Set value: $1 (y/n): " yn
if [[ $yn != "y" ]]; then
return
fi
if [[ $2 = true ]]; then
read -srp "$1: " val
echo
else
read -rp "$1: " val
fi
aws ssm put-parameter --name "$1" --value "$val" --type String --overwrite
}
configure github-access-token
configure mysql-user
configure mysql-pass true
configure jumpbox-pass true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment