|
@@ -7,13 +7,17 @@ function argparse {
|
|
|
while (( "$#" )); do
|
|
|
case "$1" in
|
|
|
-h|--help)
|
|
|
- echo Usage: $0 '[-r|--refresh] [-l|--local] [-t|--test] [-s|--skipqualys] [-d|--debug]'
|
|
|
+ echo Usage: $0 '[-r|--refresh] [-l|--local] [-t|--test] [-u|--upgrade] [-s|--skipqualys] [-d|--debug]'
|
|
|
exit 0
|
|
|
;;
|
|
|
-t|--test)
|
|
|
TESTING="/bin/echo TESTING: "
|
|
|
shift
|
|
|
;;
|
|
|
+ -u|--upgrade)
|
|
|
+ UPGRADE="--upgrade"
|
|
|
+ shift
|
|
|
+ ;;
|
|
|
-l|--local)
|
|
|
LOCAL="1"
|
|
|
shift
|
|
@@ -137,7 +141,7 @@ for i in `seq -f "%g*" 0 9 | sort -n`; do
|
|
|
pushd . > /dev/null
|
|
|
cd $i
|
|
|
[[ $TESTING ]] && ${TERRAGRUNT_BIN} plan # Run a plan if testing
|
|
|
- [[ $TESTING ]] || ${TERRAGRUNT_BIN} init # Run an init and apply
|
|
|
+ [[ $TESTING ]] || ${TERRAGRUNT_BIN} init ${UPGRADE} # Run an init and apply
|
|
|
[[ $TESTING ]] || ${TERRAGRUNT_BIN} apply ${REFRESH}
|
|
|
EXITCODE=$?
|
|
|
popd > /dev/null
|
|
@@ -149,7 +153,7 @@ for i in `seq -f "%g*" 0 9 | sort -n`; do
|
|
|
EXITCODE=0
|
|
|
else
|
|
|
[[ $TESTING ]] && ${TERRAGRUNT_BIN} plan # Run a plan if testing
|
|
|
- [[ $TESTING ]] || ${TERRAGRUNT_BIN} init # Run an init and apply otherwise
|
|
|
+ [[ $TESTING ]] || ${TERRAGRUNT_BIN} init ${UPGRADE} # Run an init and apply otherwise
|
|
|
[[ $TESTING ]] || ${TERRAGRUNT_BIN} apply ${REFRESH}
|
|
|
EXITCODE=$?
|
|
|
fi
|