MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.2k stars 21.35k forks source link

functions-infrastructure-as-code.md documentation contains incorrect informaton #102029

Open msclbu opened 1 year ago

msclbu commented 1 year ago

https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-functions/functions-infrastructure-as-code.md

In the section on creating a consumption plan, the serverfarms schema contains incorrect information.

image

The property "computeMode" is invalid on template validation and even throws a warning of invalid property within vsCode.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

SaibabaBalapur-MSFT commented 1 year ago

@msclbu Thanks for your feedback! We will investigate and update as appropriate.

MughundhanRaveendran-MSFT commented 1 year ago

@msclbu , "computeMode": "Dynamic" works for me when I use it in the json ARM template. Please try this ARM template for reference : https://github.com/Azure-Samples/function-app-arm-templates/tree/main/function-app-windows-consumption

msclbu commented 1 year ago

@MughundhanRaveendran-MSFT Please see screenshot of a Bicep template:

image

MughundhanRaveendran-MSFT commented 1 year ago

@msclbu , You can use the following bicep template to deploy the function on the consumption plan. I will investigate this issue in the meantime

resource hostingPlan 'Microsoft.Web/serverfarms@2021-03-01' = { name: hostingPlanName location: location sku: { name: 'Y1' tier: 'Dynamic' } properties: {} }

https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-bicep?tabs=CLI#review-the-bicep-file