Prevent Assignment of Reserved CIDRs to Subnets #522
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.
Overview
This PR introduces a new Azure Policy definition as part of /Network.
The policy enables for CIDRs to be configured as non-usable by subnets; this can be useful in self-governing teams where a large range is allocated - but wish to earmark portions for specific purposes, such as future expansion, shared services, etc.
Problem Statement
In enterprise environments with decentralized subscription ownership, teams often receive large IP address allocations to manage independently. Without guardrails, there's a risk that subnets could inadvertently consume IP ranges earmarked for,
What the Policy Does
This policy uses
ipRangeContainsto perform bi-directional overlap detection.The intent is for this to be used in combination with "Exemptions", to provide just-in-time provisioning ability - whilst providing a hard guardrail.
If Azure Policy becomes identity-aware in the future, there is also scope for this to be used such that only X user may leverage specific ranges - useful in platform-team scenarios.