Skip to content

Commit

Permalink
[FunctionApp] Fix Azure#23135: az functionapp plan create with '--min…
Browse files Browse the repository at this point in the history
…-instances' or '--number-of-workers' option fails

Fixes Azure#23135
  • Loading branch information
RakeshMohanMSFT authored Jul 8, 2022
1 parent 9aa3b45 commit 1a5913a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3379,8 +3379,10 @@ def create_functionapp_app_service_plan(cmd, resource_group_name, name, is_linux
client = web_client_factory(cmd.cli_ctx)
if location is None:
location = _get_location_from_resource_group(cmd.cli_ctx, resource_group_name)

if number_of_workers is not None:
number_of_workers = validate_range_of_int_flag('--number-of-workers', number_of_workers, min_val=0, max_val=20)

sku_def = SkuDescription(tier=tier, name=sku, capacity=number_of_workers)
plan_def = AppServicePlan(location=location, tags=tags, sku=sku_def,
reserved=(is_linux or None), maximum_elastic_worker_count=max_burst,
Expand Down

0 comments on commit 1a5913a

Please sign in to comment.