Created
September 18, 2018 18:42
-
-
Save rms1000watt/ad931626cb3a397de3eb2b4a7c65f13b to your computer and use it in GitHub Desktop.
Provision SSM via bash script
This file contains hidden or 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
| #!/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