You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You use this file to create these Azure resources:
35
+
This deployment file creates these Azure resources needed by a function app that securely connects to Azure services:
36
36
37
-
+[**microsoft.Insights/components**](/azure/templates/microsoft.insights/components): creates an Application Insights instance for monitoring your app.
38
-
+[**Microsoft.OperationalInsights/workspaces**](/azure/templates/microsoft.operationalinsights/workspaces): creates a workspace required by Application Insights.
39
-
+[**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): create an Azure Storage account, which is required by Functions.
40
-
+[**Microsoft.Web/serverfarms**](/azure/templates/microsoft.web/serverfarms): create a serverless Flex Consumption hosting plan for the function app.
41
-
+[**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites): create a function app.
+ The storage account is used to store important app data, including the application code deployment package. This deployment creates a storage account that is accessed using Microsoft Entra ID authentication and managed identities. Identity access is granted on a least-permissions basis.
47
-
+ The Bicep file defaults to creating a C# app that uses .NET 8 in an isolated process. For other languages, use the `functionAppRuntime` and `functionAppRuntimeVersion` parameters to specify the specific language and version on which to run your app. Make sure to select your programming language at the [top](#top) of the article.
Now that you have deployed a function app and related resources to Azure, can continue to the next step of publishing project code to your app. Otherwise, use these commands to delete the resources, when you no longer need them.
148
-
149
-
### [CLI](#tab/CLI)
150
-
151
-
```azurecli-interactive
152
-
az group delete --name exampleRG
153
-
```
154
-
155
-
### [PowerShell](#tab/PowerShell)
156
-
157
-
```azurepowershell-interactive
158
-
Remove-AzResourceGroup -Name exampleRG
159
-
```
160
-
161
-
---
162
-
163
-
You can also remove resources by using the [Azure portal](https://portal.azure.com).
# Quickstart: Create and deploy Azure Functions resources from an ARM template
11
12
12
-
In this article, you use Azure Functions with an Azure Resource Manager template (ARM template) to create a function app and related resources in Azure. The function app provides an execution context for your function code executions.
13
+
In this article, you use an Azure Resource Manager template (ARM template) to create a function app in a Flex Consumption plan in Azure, along with its required Azure resources. The function app provides a serverless execution context for your function code executions. The app uses Microsoft Entra ID with managed identities to connect to other Azure resources.
13
14
14
15
Completing this quickstart incurs a small cost of a few USD cents or less in your Azure account.
If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template will open in the Azure portal.
19
+
If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template opens in the Azure portal.
19
20
20
21
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.web%2Ffunction-app-create-dynamic%2Fazuredeploy.json":::
21
22
22
-
After you create the function app, you can deploy Azure Functions project code to that app.
23
+
After you create the function app, you can deploy your Azure Functions project code to that app. A final code deployment step is outside the scope of this quickstart article.
23
24
24
25
## Prerequisites
25
26
@@ -33,72 +34,145 @@ The template used in this quickstart is from [Azure Quickstart Templates](https:
The following four Azure resources are created by this template:
37
+
This template creates these Azure resources needed by a function app that securely connects to Azure services:
37
38
38
-
+[**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): create an Azure Storage account, which is required by Functions.
39
-
+[**Microsoft.Web/serverfarms**](/azure/templates/microsoft.web/serverfarms): create a serverless Consumption hosting plan for the function app.
40
-
+[**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites): create a function app.
41
-
+[**microsoft.insights/components**](/azure/templates/microsoft.insights/components): create an Application Insights instance for monitoring.
The following scripts are designed for and tested in [Azure Cloud Shell](../cloud-shell/overview.md). Choose **Try It** to open a Cloud Shell instance right in your browser.
45
+
These scripts are designed for and tested in [Azure Cloud Shell](../cloud-shell/overview.md). Choose **Try It** to open a Cloud Shell instance right in your browser. When prompted, enter the name of a region that [supports the Flex Consumption plan](./flex-consumption-how-to.md#view-currently-supported-regions), such as `eastus` or `northeurope`.
49
46
50
-
# [Azure CLI](#tab/azure-cli)
51
-
```azurecli-interactive
52
-
read -p "Enter a resource group name that is used for generating resource names:" resourceGroupName &&
53
-
read -p "Enter the location (like 'eastus' or 'northeurope'):" location &&
If you continue to the next step and add an Azure Storage queue output binding, keep all your resources in place as you'll build on what you've already done.
+[**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites): creates your function app.
10
+
+[**Microsoft.Web/serverfarms**](/azure/templates/microsoft.web/serverfarms): creates a serverless Flex Consumption hosting plan for your app.
11
+
+[**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): creates an Azure Storage account, which is required by Functions.
12
+
+[**Microsoft.Insights/components**](/azure/templates/microsoft.insights/components): creates an Application Insights instance for monitoring your app.
13
+
+[**Microsoft.OperationalInsights/workspaces**](/azure/templates/microsoft.operationalinsights/workspaces): creates a workspace required by Application Insights.
14
+
+[**Microsoft.ManagedIdentity/userAssignedIdentities**](/azure/templates/microsoft.managedidentity/userassignedidentities): creates a user-assigned managed identity that's used by the app to authenticate with other Azure services using Microsoft Entra.
15
+
+[**Microsoft.Authorization/roleAssignments**](/azure/templates/microsoft.authorization/roleassignments): creates role assignments to the user-assigned managed identity, which provide the app with least-privilege access when connecting to other Azure services.
0 commit comments