Sha256: 5b585f178fb974367d114c6af065486768147a8380de77252278ec71b51cb3c8

Contents?: true

Size: 689 Bytes

Versions: 15

Compression:

Stored size: 689 Bytes

Contents

function scale_asg_to() {
  n=$1
  ASG=$(asg)
  echo "Scaling $ASG to $n"
  aws autoscaling update-auto-scaling-group --auto-scaling-group-name $ASG \
    --desired-capacity $n --min-size $n --max-size $n
}

# aws cloudformation describe-stacks --stack-name ecs-qa | jq -r '.Stacks[].Outputs[] | select(.OutputKey == "Asg") | .OutputValue'
# aws cloudformation describe-stack-resources --stack-name ecs-qa | jq -r '.StackResources[] | select(.LogicalResourceId == "Asg") | .PhysicalResourceId'
function asg() {
  STACK_NAME=ecs-qa
  ASG=$(aws cloudformation describe-stacks --stack-name $STACK_NAME | jq -r '.Stacks[].Outputs[] | select(.OutputKey == "Asg") | .OutputValue')
  echo $ASG
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ufo-6.3.13 .cody/acceptance/bin/asg.sh
ufo-6.3.12 .cody/acceptance/bin/asg.sh
ufo-6.3.11 .cody/acceptance/bin/asg.sh
ufo-6.3.10 .cody/acceptance/bin/asg.sh
ufo-6.3.9 .cody/acceptance/bin/asg.sh
ufo-6.3.8 .cody/acceptance/bin/asg.sh
ufo-6.3.7 .cody/acceptance/bin/asg.sh
ufo-6.3.6 .cody/acceptance/bin/asg.sh
ufo-6.3.5 .cody/acceptance/bin/asg.sh
ufo-6.3.4 .cody/acceptance/bin/asg.sh
ufo-6.3.3 .cody/acceptance/bin/asg.sh
ufo-6.3.2 .cody/acceptance/bin/asg.sh
ufo-6.3.1 .cody/acceptance/bin/asg.sh
ufo-6.3.0 .cody/acceptance/bin/asg.sh
ufo-6.2.5 .cody/acceptance/bin/asg.sh