Skip to content

Commit 80b24b2

Browse files
authored
Merge pull request #290925 from dlepow/prefix
[APIM] addressPrefix subnet requirement
2 parents d4c3045 + 2a6b5e3 commit 80b24b2

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

articles/api-management/inject-vnet-v2.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ The subnet needs to be delegated to the **Microsoft.Web/hostingEnvironments** se
6868
6969
For more information about configuring subnet delegation, see [Add or remove a subnet delegation](../virtual-network/manage-subnet-delegation.md).
7070

71+
[!INCLUDE [api-management-virtual-network-address-prefix](../../includes/api-management-virtual-network-address-prefix.md)]
72+
7173
### Permissions
7274

73-
You must have at least the following role-based access control permissions on the subnet or at a higher level to configure virtual network integration:
75+
You must have at least the following role-based access control permissions on the subnet or at a higher level to configure virtual network injection:
7476

7577
| Action | Description |
7678
|-|-|
@@ -86,13 +88,11 @@ When you [create](get-started-create-service-instance.md) a Premium v2 instance
8688

8789
1. In the **Create API Management service** wizard, select the **Networking** tab.
8890
1. In **Connectivity type**, select **Virtual network**.
89-
1. In **Type**, select **Internal**.
90-
1. In **Configure virtual networks**, select the virtual network and the delegated subnet that you want to integrate.
91-
92-
Optionally, provide a public IP address resource if you want to own and control an IP address that's used only for outbound connection to the internet.
91+
1. In **Type**, select **Injection**.
92+
1. In **Configure virtual networks**, select the virtual network and the delegated subnet that you want to inject.
9393
1. Complete the wizard to create the API Management instance.
9494

95-
## DNS settings for integration with private IP address
95+
## DNS settings for access to private IP address
9696

9797
When a Premium v2 API Management instance is injected in a virtual network, you have to manage your own DNS to enable inbound access to API Management.
9898

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
author: dlepow
3+
ms.service: azure-api-management
4+
ms.topic: include
5+
ms.date: 11/21/2024
6+
ms.author: danlep
7+
---
8+
9+
### addressPrefix property
10+
11+
Virtual network injection in the Premium v2 tier requires that the `addressPrefix` subnet property is set to a valid CIDR block.
12+
13+
If you configure the subnet using the Azure portal, the subnet sets an `addressPrefixes` (plural) property consisting of a list of address prefixes. However, API Management requires a single CIDR block as the value of the `addressPrefix` property.
14+
15+
To create or update a subnet with `addressPrefix`, use a tool such as Azure PowerShell, an Azure Resource Manager template, or the [REST API](/rest/api/virtualnetwork/subnets/create-or-update). For example, update a subnet using the [Set-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/set-azvirtualnetworksubnetconfig) Azure PowerShell cmdlet:
16+
17+
```powershell
18+
# Set values for the variables that are appropriate for your environment.
19+
20+
$resourceGroupName = "MyResourceGroup"
21+
$virtualNetworkName = "MyVirtualNetwork"
22+
$subnetName = "ApimSubnet"
23+
$addressPrefix = "10.0.3.0/24"
24+
25+
26+
$virtualNetwork = Get-AzVirtualNetwork -Name $virtualNetworkName -ResourceGroupName $resourceGroupName
27+
28+
Set-AzVirtualNetworkSubnetConfig -Name $subnetName -VirtualNetwork $virtualNetwork -AddressPrefix $addressPrefix
29+
30+
$virtualNetwork | Set-AzVirtualNetwork
31+
```

0 commit comments

Comments
 (0)