Created
May 2, 2021 08:48
-
-
Save geekzter/13729013b60acbdfeb31955404798d6d to your computer and use it in GitHub Desktop.
Generate random CIDR
This file contains 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
# Set random CIDR (to reduce the risk of clashing VNet peerings with agent VNet) | |
$env:TF_VAR_address_space ??= "$([IPAddress]::Parse([String] (167772160 + (65536*(Get-Random -Minimum 0 -Maximum 255 -SetSeed $(Build.BuildId))))) | Select-Object -ExpandProperty IPAddressToString)/16" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment