Skip to content

Commit b2b8089

Browse files
Merge pull request #265432 from madsd/routingappsettings
Routing app settings
2 parents 480fdca + 89965b4 commit b2b8089

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

articles/app-service/overview-vnet-integration.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Integrate your app with an Azure virtual network
33
description: Integrate your app in Azure App Service with Azure virtual networks.
44
author: madsd
55
ms.topic: conceptual
6-
ms.date: 07/21/2023
6+
ms.date: 02/06/2024
77
ms.author: madsd
88
ms.custom: UpdateFrequency3
99

@@ -20,7 +20,7 @@ App Service has two variations:
2020
* The dedicated compute pricing tiers, which include the Basic, Standard, Premium, Premium v2, and Premium v3.
2121
* The App Service Environment, which deploys directly into your virtual network with dedicated supporting infrastructure and is using the Isolated and Isolated v2 pricing tiers.
2222

23-
The virtual network integration feature is used in Azure App Service dedicated compute pricing tiers. If your app is in an [App Service Environment](./environment/overview.md), it's already integrated with a virtual network and doesn't require you to configure virtual network integration feature to reach resources in the same virtual network. For more information on all the networking features, see [App Service networking features](./networking-features.md).
23+
The virtual network integration feature is used in Azure App Service dedicated compute pricing tiers. If your app is in an [App Service Environment](./environment/overview.md), it already integrates with a virtual network and doesn't require you to configure virtual network integration feature to reach resources in the same virtual network. For more information on all the networking features, see [App Service networking features](./networking-features.md).
2424

2525
Virtual network integration gives your app access to resources in your virtual network, but it doesn't grant inbound private access to your app from the virtual network. Private site access refers to making an app accessible only from a private network, such as from within an Azure virtual network. Virtual network integration is used only to make outbound calls from your app into your virtual network. Refer to [private endpoint](./networking/private-endpoint.md) for inbound private access.
2626

@@ -46,7 +46,7 @@ Virtual network integration supports connecting to a virtual network in the same
4646

4747
When you use virtual network integration, you can use the following Azure networking features:
4848

49-
* **Network security groups (NSGs)**: You can block outbound traffic with an NSG that's placed on your integration subnet. The inbound rules don't apply because you can't use virtual network integration to provide inbound access to your app.
49+
* **Network security groups (NSGs)**: You can block outbound traffic with an NSG that you use on your integration subnet. The inbound rules don't apply because you can't use virtual network integration to provide inbound access to your app.
5050
* **Route tables (UDRs)**: You can place a route table on the integration subnet to send outbound traffic where you want.
5151
* **NAT gateway**: You can use [NAT gateway](./networking/nat-gateway-integration.md) to get a dedicated outbound IP and mitigate SNAT port exhaustion.
5252

@@ -87,7 +87,7 @@ Because subnet size can't be changed after assignment, use a subnet that's large
8787
>
8888
> Since you have 1 App Service plan, 1 x 50 = 50 IP addresses.
8989
90-
When you want your apps in your plan to reach a virtual network that's already connected to by apps in another plan, select a different subnet than the one being used by the pre-existing virtual network integration.
90+
When you want your apps in your plan to reach a virtual network that apps in another plan already connect to, select a different subnet than the one being used by the pre-existing virtual network integration.
9191

9292
## Permissions
9393

@@ -99,17 +99,17 @@ You must have at least the following Role-based access control permissions on th
9999
| Microsoft.Network/virtualNetworks/subnets/read | Read a virtual network subnet definition |
100100
| Microsoft.Network/virtualNetworks/subnets/join/action | Joins a virtual network |
101101

102-
If the virtual network is in a different subscription than the app, you must ensure that the subscription with the virtual network is registered for the `Microsoft.Web` resource provider. You can explicitly register the provider [by following this documentation](../azure-resource-manager/management/resource-providers-and-types.md#register-resource-provider), but it's automatically registered when creating the first web app in a subscription.
102+
If the virtual network is in a different subscription than the app, you must ensure that the subscription with the virtual network is registered for the `Microsoft.Web` resource provider. You can explicitly register the provider [by following this documentation](../azure-resource-manager/management/resource-providers-and-types.md#register-resource-provider), but it also automatically registers when creating the first web app in a subscription.
103103

104104
## Routes
105105

106106
You can control what traffic goes through the virtual network integration. There are three types of routing to consider when you configure virtual network integration. [Application routing](#application-routing) defines what traffic is routed from your app and into the virtual network. [Configuration routing](#configuration-routing) affects operations that happen before or during startup of your app. Examples are container image pull and [app settings with Key Vault reference](./app-service-key-vault-references.md). [Network routing](#network-routing) is the ability to handle how both app and configuration traffic are routed from your virtual network and out.
107107

108-
Through application routing or configuration routing options, you can configure what traffic is sent through the virtual network integration. Traffic is only subject to [network routing](#network-routing) if it's sent through the virtual network integration.
108+
Through application routing or configuration routing options, you can configure what traffic is sent through the virtual network integration. Traffic is only subject to [network routing](#network-routing) if sent through the virtual network integration.
109109

110110
### Application routing
111111

112-
Application routing applies to traffic that is sent from your app after it has been started. See [configuration routing](#configuration-routing) for traffic during startup. When you configure application routing, you can either route all traffic or only private traffic (also known as [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918#section-3) traffic) into your virtual network. You configure this behavior through the outbound internet traffic setting. If outbound internet traffic routing is disabled, your app only routes private traffic into your virtual network. If you want to route all your outbound app traffic into your virtual network, make sure that outbound internet traffic is enabled.
112+
Application routing applies to traffic that is sent from your app after it starts. See [configuration routing](#configuration-routing) for traffic during startup. When you configure application routing, you can either route all traffic or only private traffic (also known as [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918#section-3) traffic) into your virtual network. You configure this behavior through the outbound internet traffic setting. If outbound internet traffic routing is disabled, your app only routes private traffic into your virtual network. If you want to route all your outbound app traffic into your virtual network, make sure that outbound internet traffic is enabled.
113113

114114
* Only traffic configured in application or configuration routing is subject to the NSGs and UDRs that are applied to your integration subnet.
115115
* When outbound internet traffic routing is enabled, the source address for your outbound traffic from your app is still one of the IP addresses that are listed in your app properties. If you route your traffic through a firewall or a NAT gateway, the source IP address originates from this service.
@@ -147,9 +147,17 @@ App settings using Key Vault references attempt to get secrets over the public r
147147
> * Configure SSL/TLS certificates from private Key Vaults is currently not supported.
148148
> * App Service Logs to private storage accounts is currently not supported. We recommend using Diagnostics Logging and allowing Trusted Services for the storage account.
149149
150+
### Routing app settings
151+
152+
App Service has existing app settings to configure application and configuration routing. Site properties override the app settings if both exist. Site properties have the advantage of being auditable with Azure Policy and validated at the time of configuration. We recommend you to use site properties.
153+
154+
You can still use the existing `WEBSITE_VNET_ROUTE_ALL` app setting to configure application routing.
155+
156+
App settings also exist for some configuration routing options. These app settings are named `WEBSITE_CONTENTOVERVNET` and `WEBSITE_PULL_IMAGE_OVER_VNET`.
157+
150158
### Network routing
151159

152-
You can use route tables to route outbound traffic from your app without restriction. Common destinations can include firewall devices or gateways. You can also use a [network security group](../virtual-network/network-security-groups-overview.md) (NSG) to block outbound traffic to resources in your virtual network or the internet. An NSG that's applied to your integration subnet is in effect regardless of any route tables applied to your integration subnet.
160+
You can use route tables to route outbound traffic from your app without restriction. Common destinations can include firewall devices or gateways. You can also use a [network security group](../virtual-network/network-security-groups-overview.md) (NSG) to block outbound traffic to resources in your virtual network or the internet. An NSG that you apply to your integration subnet is in effect regardless of any route tables applied to your integration subnet.
153161

154162
Route tables and network security groups only apply to traffic routed through the virtual network integration. See [application routing](#application-routing) and [configuration routing](#configuration-routing) for details. Routes don't apply to replies from inbound app requests and inbound rules in an NSG don't apply to your app. Virtual network integration affects only outbound traffic from your app. To control inbound traffic to your app, use the [access restrictions](./overview-access-restrictions.md) feature or [private endpoints](./networking/private-endpoint.md).
155163

@@ -187,7 +195,7 @@ There are some limitations with using virtual network integration:
187195
* The app and the virtual network must be in the same region.
188196
* The integration virtual network can't have IPv6 address spaces defined.
189197
* The integration subnet can't have [service endpoint policies](../virtual-network/virtual-network-service-endpoint-policies-overview.md) enabled.
190-
* The integration subnet can be used by only one App Service plan.
198+
* Only one App Service plan virtual network integration connection per integration subnet is supported.
191199
* You can't delete a virtual network with an integrated app. Remove the integration before you delete the virtual network.
192200
* You can't have more than two virtual network integrations per Windows App Service plan. You can't have more than one virtual network integration per Linux App Service plan. Multiple apps in the same App Service plan can use the same virtual network integration.
193201
* You can't change the subscription of an app or a plan while there's an app that's using virtual network integration.
@@ -226,7 +234,7 @@ The feature is easy to set up, but that doesn't mean your experience is problem
226234
227235
### Deleting the App Service plan or app before disconnecting the network integration
228236

229-
If you deleted the app or the App Service plan without disconnecting the virtual network integration first, you aren't able to do any update/delete operations on the virtual network or subnet that was used for the integration with the deleted resource. A subnet delegation 'Microsoft.Web/serverFarms' remains assigned to your subnet and prevents the update/delete operations.
237+
If you deleted the app or the App Service plan without disconnecting the virtual network integration first, you aren't able to do any update/delete operations on the virtual network or subnet that was used for the integration with the deleted resource. A subnet delegation 'Microsoft.Web/serverFarms' remains assigned to your subnet and prevents the update and delete operations.
230238

231239
In order to do update/delete the subnet or virtual network again, you need to re-create the virtual network integration, and then disconnect it:
232240
1. Re-create the App Service plan and app (it's mandatory to use the exact same web app name as before).

0 commit comments

Comments
 (0)