Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Virtual Networks]: Missing support for ipamPoolPrefixAllocations property #2382

Open
1 task done
oWretch opened this issue Dec 3, 2024 · 0 comments
Open
1 task done

Comments

@oWretch
Copy link

oWretch commented Dec 3, 2024

Resource Type

Microsoft.Network/virtualNetworks

Api Version

2024-03-01

Issue Type

Missing property(s)

Other Notes

The ipamPoolPrefixAllocations property now exists to support allocation of address spaces from IPAM (see https://learn.microsoft.com/en-us/azure/virtual-network-manager/how-to-manage-ip-addresses-network-manager?tabs=armtemplate)

The API documentation hasn't been updated yet (https://learn.microsoft.com/en-us/azure/templates/microsoft.network/virtualnetworks?pivots=deployment-language-bicep)

This property is valid under properties -> addressSpace for virtualNetworks, and directly under properties for subnets.

Bicep Repro

resource networkManager 'Microsoft.Network/networkManagers@2024-03-01' existing = {
  name: 'NetworkManager'
}

resource ipamPool 'Microsoft.Network/networkManagers/ipamPools@2024-01-01-preview' existing = {
  parent: networkManager
  name: 'CoreNetwork'
}

resource dynamic 'Microsoft.Network/virtualNetworks@2024-03-01' = {
  name: 'dynamic-vnet'
  location: resourceGroup().location
  properties: {
    addressSpace: {
      ipamPoolPrefixAllocations: [
        {
          pool: { id: ipamPool.id }
          numberOfIpAddresses: 256
        }
      ]
    }
  }

  resource defaultSubnet 'subnets' = {
    name: 'default'
    properties: {
      ipamPoolPrefixAllocations: [
        {
          pool: { id: ipamPool.id }
          numberOfIpAddresses: 64
        }
      ]
    }
  }
}

Confirm

  • I have read the troubleshooting guide and looked for duplicates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant