0

I am trying to create a new Azure App Service Environment within an existing virtual network that contains two address spaces. In this case I am trying to create the subnet in the second address space as shown below.

enter image description here

When I then try to create a new Subnet Address Block of 172.31.12.0/25 the Azure Portal tells me that the "Subnet not contained in the address space". Surely this is correct as the CIDR Range is from 172.31.12.0 - 172.31.12.127 for this range.

enter image description here

The sites validation will allow me to create a small range within the 172.31.11.0/24 range but this isn't what I need.

Anyone know what I am missing here?

Phil Murray
  • 6,396
  • 9
  • 45
  • 95

1 Answers1

0

It's the same error as you on my side. It looks like a restriction or something else like that on the Azure portal. It seems that you only could select the subnet address block from the original address space for the ASE. Even I change to select the Virtual Network Address Block to the second address space and create the subnet in the original address space, this still works.

enter image description here

update

As a workaround, you could create an ASE subnet from the second address space via this ARM template.

  1. Create a second address space in the Azure VNet mynettest enter image description here
  2. Create a subnet2 in this address space. enter image description here
  3. Use the above parameters to deploy the template. Create an ASE in the subnet2. enter image description here
Nancy
  • 26,865
  • 3
  • 18
  • 34
  • Yes, looks like a bug in the portal. I was wondering if there's and ARM template that will get around this problem. Will have to research. – Phil Murray Feb 28 '19 at 08:01
  • You could follow [this arm template](https://azure.microsoft.com/en-us/resources/templates/201-web-app-asev2-create/) to create an ASE. This could create an ASE in the subnet of the second address space. – Nancy Mar 04 '19 at 05:21
  • Have you tried the ARM template? Is this helpful for you? – Nancy Mar 05 '19 at 05:09
  • In the end I changes my Address space to a single /23 line and it worked. Definitely looks like a bug with the portal. – Phil Murray Mar 05 '19 at 09:00
  • Yes, It's like a bug, if the reply is helpful, you may accept it:) I tried the ARM. It's working well. – Nancy Mar 05 '19 at 09:04
  • If you detail the fix via an ARM template then I will mark it as the answer – Phil Murray Mar 05 '19 at 18:36