Home > front end >  Can't configure network config on two azure web apps
Can't configure network config on two azure web apps

Time:07-02

Facing a problem about VNET and Azure Web Apps I don't understand.

My issue

This is my setting:

enter image description here

Two web apps on the same service plan SP1 (SP1 (P1v2: 1)) and a VNET, VNET1:

enter image description here

Both subnets have Microsoft.Web/serverFarms delegation.

I want to add network config on my webapps webapps1 and webapps4.

I run this PowerShell script:

properties = @{
    subnetResourceId = "/subscriptions/XXX/resourceGroups/RG1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/sub01"
}

$vNetParams = @{
    ResourceName      = "mywebapps1/VirtualNetwork"
    Location          = "West Europe"
    ResourceGroupName = "RG1"
    ResourceType      = "Microsoft.Web/sites/networkConfig"
    PropertyObject    = $properties
}


$result = New-AzResource @vNetParams -Force

$properties = @{
    subnetResourceId = "/subscriptions/XXX/resourceGroups/RG1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/sub02"
}

$vNetParams = @{
    ResourceName      = "mywebapps4/VirtualNetwork"
    Location          = "West Europe"
    ResourceGroupName = "RG1"
    ResourceType      = "Microsoft.Web/sites/networkConfig"
    PropertyObject    = $properties
}

$result = New-AzResource @vNetParams -Force

First new-azresource works fine:

enter image description here

But the second one throw this error message:

New-AzResource : {"Code":"Conflict","Message":"Adding this VNET would exceed the App Service Plan VNET limit of 1

What I did

I search for this error message. But found only one situation that did not help me or maybe I did not understand.

What I need

  1. Understand what it means.
  2. How I should do

Thank you

CodePudding user response:

  • Regional virtual integration can use One virtual interface per worker means one regional virtual network integration per App Service plan. All the apps in the same App Service plan can only use the same virtual network integration to a specific subnet.

  • Gate-way required virtual network integration Enables an app to connect to only one virtual network at a time. This can Enables up to five virtual networks to be integrated within an App Service plan.

Refer to this documentation for more information about different virtual network integrations and their limitations as well.

For more information you can refer to these similar threads:

https://social.msdn.microsoft.com/Forums/en-US/a8b51183-d94b-48c9-9b6c-e6a4dbec9919/vnet-integration-limit-of-1?forum=azureappconfiguration

  • Related