-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create consumption function app plan #11195
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ ahmedelnably, @fabiocav |
@David-Stark did you find a solution or work around for this? |
I am also wondering about this one. I want to provision the function in the Azure DevOps pipeline using the "Azure Cli task" |
I would love to have this option so that I can downgrade my ASE from premium to consumption. |
We currently don't support the ability to create a consumption plan by itself. For downgrade scenarios from Premium to Consumption, please create a new function app for the time being. We'll look into whether we can enable this. |
@anthonychu is there a way to set the name of the created dynamic plan? I would like to get it to follow our conventions, the dynamic plan name sticking out just doesn't look all the professional. |
It's not an optimal solution, but until they add this functionality to az cli, here's a small ARM template that will let you customize the name of the ASP (obviously you'll want to change the region to suit your needs): {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"asp-name": {
"defaultValue": "THE-NAME-OF-THE-APP-SERVICE-PLAN-GOES-HERE",
"type": "String"
},
"region-name": {
"defaultValue": "West US",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"name": "[parameters('asp-name')]",
"location": "[parameters('region-name')]",
"sku": {
"name": "Y1",
"tier": "Dynamic",
"size": "Y1",
"family": "Y",
"capacity": 0
},
"kind": "functionapp",
"properties": {
"perSiteScaling": false,
"maximumElasticWorkerCount": 1,
"isSpot": false,
"reserved": false,
"isXenon": false,
"hyperV": false,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0
}
}
]
} |
Still no fix? |
function service team should look into this |
Just discovered this too. I wanted to control the name of the app service plan that is created for me. E.g az functionapp create \
--name $functionAppName \
--resource-group $resourceGroup \
--storage-account $storageName \
--app-insights $appInsightsName \
--consumption-plan-location westeurope \
--functions-version 4 \
--os-type Windows \
--runtime powershell \
--runtime-version 7.0 Creates an app service plan resource of the name I tried adding in |
Absolutely ridiculous that the only way to create a consumption plan is via an ARM template. Either allow us to edit the plan name in the portal UI when the function app service is created, or allow us to create a consumption plan via the cli. |
Currently, this is the workaround I use to create a consumption plan and to let it have a name I choose: #8388 (comment) |
@davidstarkcab Apologies for the late reply. Could you please check this and this and see if it helps? Awaiting your reply. |
@navba-MSFT No problems! What i can see from these commands is that they will only create a new azure function? I want to be able to set the name on the plan. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Stefanus Hinardi, @Francisco-Gamino. Issue Details
Describe the bug Invalid sku(pricing tier), please refer to command help for valid values To Reproduce Run following command: az functionapp plan create --name myplan --resource-group mygroup --location westeurope --sku Y1 or az functionapp plan create --name myplan --resource-group mygroup --location westeurope --sku Dynamic Expected behavior Creates a consumption function app plan in azure Environment summary Additional context
|
@Francisco-Gamino Could you please look into this issue and provide an update once you get a chance ? Awaiting your reply. |
Hello @navba-MSFT -- I do not work on the |
This seems to still be an issue. The |
Another work around is From: http://chamindac.blogspot.com/2021/01/create-windows-or-linux-consumption.html e.g. (replace xxxx with your business details). Works with SKU = Y1, Tier = Dynamic $rgName = "rg-xxxx-$Environment-01".ToLowerInvariant()
$funcAspName = "asp-xxxx-$Environment-01".ToLowerInvariant()
$TagDictionary = @{ DataClassification = 'Confidential'; Criticality = $criticality;
BusinessUnit = 'xxxx'; Env = $Environment }
$tagsJson = $TagDictionary.Keys | ForEach-Object { $key = $_; '\"'+ $key + '\":\"' + $TagDictionary[$key] + '\"' }
$funcAspProperties = '{\"kind\":\"functionapp\", ' `
+ '\"location\":\"' + $Location + '\", ' `
+ '\"sku\":{\"name\":\"' + $FuncPlanSku + '\",\"tier\":\"' + $FuncPlanTier + '\"}, ' `
+ '\"tags\":{' + [string]::Join(', ', $tagsJson) + '}' `
+ '}'
Write-Verbose "Creating with properties: $funcAspProperties"
az resource create `
--resource-group $rgName `
--name $funcAspName `
--resource-type 'Microsoft.web/serverfarms' `
--is-full-object `
--properties $funcAspProperties |
Adding Functions Az CLI team: @amamounelsayed @shreyabatra4 @kaibocai |
any updates on this? Seems like a relatively easy fix and it's really annoying to have those location-based auto-generated names.... |
Any updates on this? |
Please can we have an update on this? It is causing a real headache... |
Describe the bug
Cannot create azure function app plan of type consumption? Get following error message:
Invalid sku(pricing tier), please refer to command help for valid values
To Reproduce
Run following command:
az functionapp plan create --name myplan --resource-group mygroup --location westeurope --sku Y1
or
az functionapp plan create --name myplan --resource-group mygroup --location westeurope --sku Dynamic
Expected behavior
Creates a consumption function app plan in azure
Environment summary
Install CLI version 2.0.76
Additional context
Have tried both Y1 and Dynamic and it doesn't work? Would be nice to have some examples what values it should be for the sku in the documentation also?
The text was updated successfully, but these errors were encountered: