Skip to content

Subnet create/update support for IPAM pool association #31447

@p-thompson

Description

@p-thompson

Related command

az network vnet subnet create
az network vnet subnet update

Is your feature request related to a problem? Please describe.

Feature request for the subnet create/update commands to introduce a new parameter: --ipam-pool-prefix-allocations. This enhancement aims to facilitate the association/disassociation of a subnet with an IP Address Management (IPAM) pool, thereby streamlining the allocation of address prefixes.

This feature support is crucial for IPAM service going GA, which was targeted for late-May.

https://learn.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-create
https://learn.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-update

Describe the solution you'd like

New Parameter details:

  • Optional Parameter
  • Enables customers to specify an IPAM pool for allocating address prefixes to resources within the subnet, instead of defining an address prefix during - subnet creation/update.
  • If this parameter is utilized, the addressPrefixes array must explicitly be empty. Otherwise, a default address prefix will be used, causing an error.

Describe alternatives you've considered

We have tried the workaround of creating a subnet with address prefixes and then removing them to instead set an ipamPoolPrefixAllocation, however this does not work; example below:
az network vnet update -g ipam-test-rg -n testVnet5825 --address-prefixes "" --set 'subnets[0].ipamPoolPrefixAllocations=[{"numberOfIpAddresses":"256","pool":{"id":"/subscriptions/c9295b92-3574-4021-95a1-26c8f74f8359/resourceGroups/ipam-test-rg/providers/Microsoft.Network/networkManagers/ipam-test-nm/ipamPools/paigetest1025"}}]'

argument --address-prefixes: expected at least one argument

Additional context

The requested new parameter already exists for vnet create and vnet update; we just need it for subnet as well

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions