diff --git a/ebcli/controllers/create.py b/ebcli/controllers/create.py index 3648c7d39..cac31650e 100644 --- a/ebcli/controllers/create.py +++ b/ebcli/controllers/create.py @@ -180,6 +180,9 @@ def do_command(self): if single and scale: raise InvalidOptionsError(strings['create.singleandsize']) + + if min_instances == 0 and max_instances == 0: + raise InvalidOptionsError(strings['create.minmaxzero']) if (max_instances or min_instances) and scale: raise InvalidOptionsError(strings['create.scaleandminmax']) diff --git a/ebcli/resources/strings.py b/ebcli/resources/strings.py index 59cda8ad6..9238cc78b 100644 --- a/ebcli/resources/strings.py +++ b/ebcli/resources/strings.py @@ -186,6 +186,7 @@ 'list of key=value pairs.', 'create.sampleandlabel': 'You cannot use the "--sample" and "--version" options together.', 'create.singleandsize': 'You cannot use the "--single" and "--scale" options together.', + 'create.minmaxzero':'You cannot set "--min-instances" and "--max-instances" to zero.', 'create.scaleandminmax': 'You cannot use the "--min-instances" or "--max-instances" and "--scale" options together.', 'create.singleandminmax': 'You cannot use the "--min-instances" or "--max-instances" and "--single" options together.', 'create.itype_and_instances' : 'You cannot use the "--instance-type" and "--instance-types" together.',