feat(azure-network): Public IP Prefixes - #911
Open
NitinKumar004 wants to merge 1 commit into
Open
Conversation
Add Microsoft.Network/publicIPPrefixes to the vnet wire handler: CRUD + list through armnetwork's PublicIPPrefixesClient Begin* pollers. On create the provider synthesizes properties.ipPrefix (a CIDR of the requested prefixLength carved from a deterministic 10.0.0.0/8 allocator); sku is top-level. The read-only publicIPAddresses[] back-reference is rebuilt by scanning public IPs whose publicIPPrefix ref matches; a public IP created with a prefix ref only stores the ref (child-IP allocation deferred). - LRO: PUT/DELETE ride the existing writeAcceptedAsync + operationStatuses responder (same async plumbing as NAT gateways). - Store bolted onto the existing vnet Mock, added to the snapshot dumps/loads list with a round-trip assertion. - Added to the PurgeResourceGroup cascade. - ARG triple (walker, portable Type const, resourcegraph forward/reverse maps), all Azure-gated; AWS/GCP ARNs and rows unchanged. - docs/coverage regenerated.
NitinKumar004
force-pushed
the
feat/azure-public-ip-prefixes
branch
from
August 31, 2026 04:45
2c787c0 to
e1cd2d3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
Microsoft.Network/publicIPPrefixes(CRUD + list) to the Azure vnet wire handler, driven end-to-end by the realarmnetwork.PublicIPPrefixesClient.properties.ipPrefix— a CIDR of the requestedprefixLengthcarved from a deterministic10.0.0.0/8allocator (monotonic /24 block counter, no randomness).prefixLengthdefaults to 28 when omitted and is immutable on re-PUT.Standard/StandardV2, tierRegional), echoed back on GET.publicIPAddresses[]back-reference: rebuilt by scanning public IPs whosepublicIPPrefixref matches this prefix. A public IP created with apublicIPPrefixref only stores the ref (child-IP allocation from the prefix range is deferred); the public IP echoes the prefix on its own GET.Architecture fit
writeAcceptedAsync+ thelocations/operationStatusesresponder) — the same pattern as NAT gateways, soBeginCreateOrUpdate/BeginDeletepollers terminate cleanly.SnapshottablevnetMock; since the completeness guard only checks the field type, the store was manually added to the provider's snapshot dumps/loads list and a round-trip assertion added tosnapshot_test.go.PurgeResourceGroupcascade so prefixes don't orphan on RG delete.resourcediscovery, portableTypePublicIPPrefixconst, and resourcegraph forward/reverse map entries. All additions are Azure-gated — AWS/GCP ARNs and Resource Graph rows are byte-unchanged (the walker fails the type assertion on AWS/GCP; the arn.go entry only extends the Azure type map).AzurePublicIPPrefixescapability on the networking driver (mirrorsAzureApplicationSecurityGroups); the cross-cloud driver is not widened.docs/coverage/regenerated.Test
Real-SDK e2e through the pollers (
server/azure/vnet/public_ip_prefix_test.go):BeginCreateOrUpdate(prefixLength=28) →PollUntilDone→Getround-trips a synthesizedipPrefixof the right size + top-level sku; list;BeginDelete→ subsequentGetreturns 404.publicIPPrefixref appears in the prefix's read-onlypublicIPAddresses[]and echoes the prefix.Refs #611.