How to create a Linux AppService Plan with New-AzAppServicePlan?

℡╲_俬逩灬. 提交于 2020-04-16 05:53:51

问题


What is the equivalient of this code using New-AzAppServicePlan?

    az appservice plan create --resource-group $ServerFarmResourceGroupName `
        --name $AppServicePlanName `
        --is-linux `
        --location $ResourceGroupLocation `
        --sku $AppServicePlanTier `
        --number-of-workers $NumberOfWorkers

Is there really no way to create an App Service Plan using Az Powershell? Why can it only be done via Azure CLI or ARM?

I only found this answer, which basically uses ARM directly: How do I use Powershell to create an Azure Web App that runs on Linux?


回答1:


There are some issues about this, suppose for now this is not supported for New-AzureRmAppServicePlan, however you could use New-AzureRmResource to create a linux plan. You could try the below command.

New-AzureRmResource -ResourceGroupName <>group name  -Location "Central US" -ResourceType microsoft.web/serverfarms -ResourceName <plan name>  -kind linux -Properties @{reserved="true"} -Sku @{name="S1";tier="Standard"; size="S1"; family="S"; capacity="1"} -Force



来源:https://stackoverflow.com/questions/59719532/how-to-create-a-linux-appservice-plan-with-new-azappserviceplan

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!