Created
October 14, 2018 01:15
-
-
Save mattmcla/44f709bb2bb1131a70be2d4a78bf42ae to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
APPSERVER_COUNT=$(aws ec2 describe-instances \ | |
--region us-west-2 \ | |
--filters "Name=tag:Environment,Values=production" "Name=tag:Name,Values=AppServer" "Name=instance-state-code,Values=16" \ | |
| jq '.Reservations | length') | |
curl -k -d $APPSERVER_COUNT -X PUT https://127.0.0.1:8500/v1/kv/prod/cluster/appserver_count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment