Verified Commit ad927c71 authored by Xueshan Feng's avatar Xueshan Feng
Browse files

AWS_PROFILE, AWS_REGION, and ASG are required.

parent 888a143b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
#!/usr/bin/env bash

AWS_PROFILE=${AWS_PROFILE:-coreos-cluster}
AWS_REGION=${AWS_REGION:-us-west-2}
ASG=${1:-etcd}
set -u
AWS_PROFILE=${AWS_PROFILE}
AWS_REGION=${AWS_REGION}
ASG=${1}

EC2_IDS=$(aws --profile $AWS_PROFILE --region $AWS_REGION autoscaling describe-auto-scaling-groups \
	--auto-scaling-group-name $ASG 2> /dev/null | jq .AutoScalingGroups[0].Instances[].InstanceId | xargs)