azureazure-rm-templateazure-app-service-plansserver-farm

How to Determine Azure App Service Plan SKUs Available in a Specific Subscription/Location Before Creation?



Solution

  • How to Determine Azure App Service Plan SKUs Available in a Specific Subscription/Location Before Creation?

    Programmatically, it is not possible to retrieve it using ARM template however, you can achieve the requirement using PowerShell or Azure resource graph query explorer which are detailed below.

    AZ PowerShell:

    $appservice =  Get-AzAppServicePlan -Location "West US"
    foreach($app in $appservice){
     $resourceGroup = $app.ResourceGroup
     $appName = $app.Name    
     $resources = Get-AzResource -ResourceGroupName $resourceGroup | Where-Object { $_.ResourceName -eq $appName }
     $sku = $resources.Sku
     $skus += $sku    
    }
    

    enter image description here

    Or

    (Get-AzAppServicePlan -Location "West US").SKU
    

    enter image description here

    Azure Resource Graph Query:

    resources
    | where type =~ "Microsoft.Web/serverfarms"  and location has  "WestUS"
    | project sku
    

    enter image description here

    resources
    | where type =~ "Microsoft.Web/serverfarms"  and subscriptionId has  "xxxxx"
    | project sku.tier
    

    enter image description here