How to do it...

By now, you know that while authoring Azure Functions, we need to ensure that we also accommodate an App Service plan and a storage account. Let's start authoring the ARM template using Visual Studio:

  1. Create a new project by choosing Visual C# | Cloud and then choose Azure Resource Group:

  1. Clicking on the OK button in the previous step will open up the Select Azure Template where you choose the Azure QuickStart (github.com/Azure/azure-quickstart-templates) templates:

  1. Search for the word function and click on the 101-function-app-create-dynamic template to create the Azure function app with the Consumption plan:

  1. The required JSON template will be created in Visual Studio. You can learn more about the JSON content at https://docs.microsoft.com/en-us/azure/azure-functions/functions-infrastructure-as-code.
  2. Deploy the ARM for provisioning the function app and its dependent resources. You can deploy it by right-clicking on the project name (in my case ARMTemplateforFunctionApp), clicking on Deploy, and then clicking on the New button:

  1. Choose the Subscription, Resource group, and other parameters for provisioning the function app. Choose all the mandatory fields and click on the Deploy button:

  1. That's it! In a few minutes, the deployment will start and each of the resources mentioned in the ARM JSON templates will be provisioned: