Azure China Region support for AzurePublicIPAddresses
I am happy to announce version 0.8.1 of Azure Public IP Addresses PowerShell module.
With this release, the module now supports the China North and China East Azure regions.
Microsoft’s China Azure regions are operated by 21Vianet, Microsoft publishes the IP subnets for these regions in a separate file to the other regions, Windows Azure Datacenter IP Ranges in China.
To implement this functionality, some changes have been made to the module. Important Note: these changes do not break any existing functionality and should not impact existing code.
Get-MicrosoftAzureDatacenterIPRangeFile
The switch parameter, -ChinaRegion
has been added to the Get-MicrosoftAzureDatacenterIPRangeFile
CMDLet. When this parameter is specified, the then China region specific file will be downloaded; if it is absent, then it will download the general region file.
Additional validation has been added to the -Path
parameter. Invalid paths should no longer be accepted.
Get-MicrosoftAzureDatacenterIPRange
This function has been to support the China North and China East Regions much like adding any other region.
Changes were required for the -path
parameter. When this parameter is absent, both files are automatically downloaded. When -path
is present, the CMDLet will now inspect the file spectified, and generate a warning that some Azure regions will be unavailable.
One additional change has been made to this CMDLet. The -AzureRegion
parameter will now accept an array containing regions. I have also added additional validation to this parameter to ensure invalid data is not passed in (via [ValidateNotNullOrEmpty()]
).
I have attempted to quite throughly test the changes to this CMDLet using Pester, and have expanded the number of included tests to ensure there are no changes.
Getting the module
The module is available via the PowerShell Gallery and GitHub.
Missing Regions
Unfortunately, there is still no support for the following regions:
- US Gov Texas
- US Gov Virginia
- US DoD Central
- US DoD East
- Germany Northeast
- Germany Central
These regions are not included in either of the region files, nor are they in their own region. If and when they are available, I will include support for them.
It should also be noted that currently the UK West region is missing from the Microsoft Azure Datacenter IP Ranges file. I have reached out to Azure support to resolve this.