view master/bin/vmss_create.sh @ 40:4cf6bc21f683

start work on python version of tW.sh
author Henry S. Thompson <ht@markup.co.uk>
date Fri, 30 Nov 2018 13:43:36 +0000
parents a7637c994964
children
line wrap: on
line source

#!/bin/bash
set -e
if ([ "$1" != "--resource-group" ] && [ "$1" != "-g" ]) || ([ "$3" != "--name" ] && [ "$3" != "-n" ]); then
  cat 1>&2 <<EOF
Usage: $0 --resource-group group --name name ...
All arguments are forwarded to az vmss create, so see that for help.
However, you must have --resource-group group --name name at the beginning.
That way they can be passed to $(dirname "$0")/vmss_setup.sh
EOF
fi
az vmss create "$@"
echo created, setting up...
"$(dirname "$0")"/vmss_setup.sh $1 $2 $3 $4