Skip to content

Commit ed3558a

Browse files
committed
More review comments
1 parent 70cfcd9 commit ed3558a

6 files changed

+163
-31
lines changed

articles/azure-functions/create-first-function-vs-code-web.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ You must have a function app to host the execution of your functions in the Flex
3434
Use these steps to create your function app and related Azure resources.
3535

3636
[!INCLUDE [functions-create-flex-consumption-app-portal](../../includes/functions-create-flex-consumption-app-portal.md)]
37-
::: zone pivot="programming-language-csharp,programming-language-java"
3837

38+
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app.
39+
40+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
41+
42+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
43+
44+
::: zone pivot="programming-language-csharp,programming-language-java"
3945
At this point, under **Create functions in your preferred environment** select your choice of local development environments. This link takes you to one of these quickstart articles, the first part of which tells you how to create a code project with an HTTP triggered function:
4046
::: zone-end
4147
::: zone pivot="programming-language-csharp"

articles/azure-functions/flex-consumption-how-to.md

Lines changed: 107 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ To support your function code, you need to create three resources:
133133
134134
[!INCLUDE [functions-create-flex-consumption-app-portal](../../includes/functions-create-flex-consumption-app-portal.md)]
135135
136+
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app.
137+
138+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
139+
140+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
141+
136142
### [Visual Studio Code](#tab/vs-code)
137143
138144
1. Press F1, and in the command pallet enter **Azure Functions: Create function app in Azure...(Advanced)**.
@@ -216,6 +222,103 @@ You can use Maven to create a Flex Consumption hosted function app and required
216222
Maven uses settings in the pom.xml template to create your function app in a Flex Consumption plan in Azure, along with the other required resources. Should these resources already exist, the code is deployed to your function app, overwriting any existing code.
217223
::: zone-end
218224
225+
## Enable virtual network integration
226+
227+
You can enable [virtual network integration](functions-networking-options.md#virtual-network-integration) for your app in a Flex Consumption plan. The examples in this section assume that you already have [created a virtual network with subnet](../virtual-network/quick-create-cli.md#create-a-virtual-network-and-subnet) in your account. You can enable virtual network integration when you create your app or at a later time.
228+
229+
To enable virtual networking when you create you app:
230+
231+
### [Azure CLI](#tab/azure-cli)
232+
233+
You can enable virtal network integration by your run the [`az functionapp create`] command by including the `--vnet` and `--subnet` parameters.
234+
235+
1. [Created the virtual network and subnet](../virtual-network/quick-create-cli.md#create-a-virtual-network-and-subnet), if you haven't already done so.
236+
237+
1. Complete steps 1-4 in [Create a Flex Consumption app](#create-a-flex-consumption-app) to create the resources required by your app.
238+
239+
1. Run the [`az functionapp create`] command, including the `--vnet` and `--subnet` parameters, as in this example:
240+
241+
```azurecli
242+
az functionapp create --resource-group <RESOURCE_GROUP> --name <APP_NAME> --storage-account <STORAGE_NAME> --flexconsumption-location <REGION> --runtime <RUNTIME_NAME> --runtime-version <RUNTIME_VERSION> --vnet <VNET_RESOURCE_ID> --subnet <SUBNET_NAME>
243+
```
244+
245+
The `<VNET_RESOURCE_ID>` value is the resource ID for the virtual network, which is in the format: `/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCER_GROUP>/providers/Microsoft.Network/virtualNetworks/<VNET_NAME>`. You can use this command to get a list of virtual network IDs, filtered by `<RESOURCE_GROUP>`: `az network vnet list --resource-group <RESOURCE_GROUP> --output tsv --query "[]".id`.
246+
247+
### [Azure portal](#tab/azure-portal)
248+
249+
Use these steps to create your function app with virtual network integration and related Azure resources.
250+
251+
[!INCLUDE [functions-create-flex-consumption-app-portal](../../includes/functions-create-flex-consumption-app-portal.md)]
252+
253+
6. In the **Networking** tab, set **Enable public access** to **Off** and **Enable network injection** to **On**.
254+
255+
7. For **Virtual network**, select or create a virtual network that is in the same region as your app.
256+
257+
8. Set **Enable VNet integration** to **On** and select or create a subnet.
258+
259+
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app with virtual networking.
260+
261+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
262+
263+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
264+
265+
### [Visual Studio Code](#tab/vs-code)
266+
267+
You can't currently enable virtual networking when you use Visual Studio Code to create your app.
268+
269+
---
270+
271+
For end-to-end examples of how to create apps in Flex Consumption with virtual network integration see these resources:
272+
273+
+ [Flex Consumption: HTTP to Event Hubs using VNET Integration](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/E2E/HTTP-VNET-EH/README.md)
274+
+ [Flex Consumption: triggered from Service Bus using VNET Integration](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/E2E/SB-VNET/README.md)
275+
276+
To modify or delete virtual network integration in an existing app:
277+
278+
### [Azure CLI](#tab/azure-cli)
279+
280+
Use the [`az functionapp vnet-integration add`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-add) command to enable virtual network integration to an existing function app:
281+
282+
```azurecli
283+
az functionapp vnet-integration add --resource-group <RESOURCE_GROUP> --name <APP_NAME> --vnet <VNET_RESOURCE_ID> --subnet <SUBNET_NAME>
284+
```
285+
286+
Use the [`az functionapp vnet-integration remove`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-remove) command to disable virtual network integration in your app:
287+
288+
```azurecli
289+
az functionapp vnet-integration remove --resource-group <RESOURCE_GROUP> --name <APP_NAME>
290+
```
291+
292+
Use the [`az functionapp vnet-integration list`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-list) command to list the current virtual network integrations for your app:
293+
294+
```azurecli
295+
az functionapp vnet-integration list --resource-group <RESOURCE_GROUP> --name <APP_NAME>
296+
```
297+
298+
### [Azure portal](#tab/azure-portal)
299+
300+
You can integrate your existing app with an existing virtual network and subnet in the portal.
301+
302+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Networking**.
303+
304+
1. Under **Outbound traffic configuration**, select **Not configured**.
305+
306+
1. In the **Virtual Network Integration** page, select **Add virtual network integration**.
307+
308+
1. Select an existing **Virtual network** and **Subnet** and select **Connect**.
309+
310+
### [Visual Studio Code](#tab/vs-code)
311+
312+
You can't currently configure virtual networking in Visual Studio Code.
313+
314+
---
315+
316+
When choosing a subnet, these considerations apply:
317+
318+
+ The subnet you choose can't already be used for other purposes, such as with private endpoints or service endpoints, or be delegated to any other hosting plan or service.
319+
+ You can share the same subnet with more than one app running in a Flex Consumptionk plan. Because the networking resources are shared across all apps, one function app might impact the performance of others on the same subnet.
320+
+ In a Flex Consumption plan, a single function app might use up to 40 IP addresses, even when the app scales beyond 40 instances. While this rule of thumb is helpful when estimating the subnet size you need, it's not strictly enforced.
321+
219322
## Configure the deployment storage account
220323

221324
In the Flex Consumption plan, the deployment package that contains your app's code is maintained in a blob storage container. By default, deployments use the same storage account and connection string (`AzureWebJobsStorage`) used by the Functions runtime to maintain your app. However, you can instead designate a blob container in a separate storage account as the deployment source for your code.
@@ -245,8 +348,6 @@ This example creates a function app in the Flex Consumption plan with a separate
245348
az functionapp create --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --storage <STORAGE_NAME> --runtime dotnet-isolated --runtime-version 8.0 --flexconsumption-location "<REGION>" --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME> --deployment-storage-auth-type storageAccountConnectionString --deployment-storage-auth-value <DEPLOYMENT_CONNECTION_STRING_NAME>"
246349
```
247350

248-
You can also modify the deployment storage configuration used to deploy to an existing app.
249-
250351
### [Azure portal](#tab/azure-portal)
251352

252353
You can't currently configure deployment storage when creating your app in the Azure portal. To configure deployment storage during app creation, instead use the Azure CLI to create your app.
@@ -259,9 +360,11 @@ You can't currently configure deployment storage when creating your app in Azure
259360

260361
---
261362

363+
You can also modify the deployment storage configuration for an existing app.
364+
262365
### [Azure CLI](#tab/azure-cli)
263366

264-
You can also use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
367+
Use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
265368

266369
```azurecli
267370
az functionapp deployment config set --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME>
@@ -315,7 +418,7 @@ At any point, you can change the instance memory size setting used by your app.
315418
This example uses the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to change the instance memory size setting to 512 MB:
316419

317420
```azurecli
318-
az functionapp scale config set -g <resourceGroup> --name <APP_NAME> --instance-memory 512
421+
az functionapp scale config set --resource-group <resourceGroup> --name <APP_NAME> --instance-memory 512
319422
```
320423

321424
### [Azure portal](#tab/azure-portal)

0 commit comments

Comments
 (0)