Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2026-01-14 00:00 | #250 | in_progress |
Clean
|
| 2026-01-13 00:00 | #246 | completed |
Clean
|
| 2026-01-11 00:00 | #240 | completed |
Biased
|
| 2026-01-10 00:00 | #237 | completed |
Biased
|
| 2026-01-09 00:34 | #234 | completed |
Biased
|
| 2026-01-08 00:53 | #231 | completed |
Biased
|
| 2026-01-06 18:15 | #225 | cancelled |
Clean
|
| 2025-08-17 00:01 | #83 | cancelled |
Clean
|
| 2025-07-13 21:37 | #48 | completed |
Biased
|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-09 13:09 | #3 | cancelled |
Clean
|
| 2025-07-08 04:23 | #2 | cancelled |
Biased
|
## Create public IP prefix for NAT gateway ##
$ip = @{
Name = 'public-ip-prefix-nat'
ResourceGroupName = 'test-rg'
Location = 'eastus2'
Sku = 'Standard'
PrefixLength ='29'
}
New-AzPublicIpPrefix @ip
## Create public IP address for NAT gateway ##
$ip = @{
Name = 'public-ip-nat'
ResourceGroupName = 'test-rg'
Location = 'eastus2'
Sku = 'Standard'
AllocationMethod = 'Static'
}
New-AzPublicIpAddress @ip
## Place the virtual network into a variable. ##
$net = @{
Name = 'vnet-1'
ResourceGroupName = 'test-rg'
}
$vnet = Get-AzVirtualNetwork @net
## Place the public IP address you created previously into a variable. ##
$pip = @{
Name = 'public-ip-nat'
ResourceGroupName = 'test-rg'
}
$publicIP = Get-AzPublicIPAddress @pip
## Create NAT gateway resource ##
$nat = @{
ResourceGroupName = 'test-rg'
Name = 'nat-gateway'
IdleTimeoutInMinutes = '4'
Sku = 'Standard'
Location = 'eastus2'
PublicIpAddress = $publicIP
}
$natGateway = New-AzNatGateway @nat
## Create the subnet configuration. ##
$sub = @{
Name = 'subnet-1'
VirtualNetwork = $vnet
NatGateway = $natGateway
AddressPrefix = '10.0.0.0/24'
}
Set-AzVirtualNetworkSubnetConfig @sub
## Save the configuration to the virtual network. ##
$vnet | Set-AzVirtualNetwork
## Place the virtual network into a variable. ##
$net = @{
Name = 'vnet-1'
ResourceGroupName = 'test-rg'
}
$vnet = Get-AzVirtualNetwork @net
## Place the public IP prefix you created previously into a variable. ##
$pip = @{
Name = 'public-ip-prefix-nat'
ResourceGroupName = 'test-rg'
}
$publicIPprefix = Get-AzPublicIPPrefix @pip
## Create NAT gateway resource ##
$nat = @{
ResourceGroupName = 'test-rgNAT'
Name = 'nat-gateway'
IdleTimeoutInMinutes = '4'
Sku = 'Standard'
Location = 'eastus2'
PublicIpPrefix = $publicIPprefix
}
$natGateway = New-AzNatGateway @nat
## Create the subnet configuration. ##
$sub = @{
Name = 'subnet-1'
VirtualNetwork = $vnet
NatGateway = $natGateway
AddressPrefix = '10.0.0.0/24'
}
Set-AzVirtualNetworkSubnetConfig @sub
## Save the configuration to the virtual network. ##
$vnet | Set-AzVirtualNetwork
# Specify the resource group and NAT gateway name
$resourceGroupName = "test-rg"
# Specify the virtual network name and subnet name
$virtualNetworkName = "vnet-1"
$subnetName = "subnet-1"
# Get the virtual network
$vnet = @{
Name = $virtualNetworkName
ResourceGroupName = $resourceGroupName
}
$virtualNetwork = Get-AzVirtualNetwork @vnet
# Get the subnet
$subnet = $virtualNetwork.Subnets | Where-Object {$_.Name -eq $subnetName}
# Remove the NAT gateway association from the subnet
$subnet.NatGateway = $null
# Update the subnet configuration
$subConfig = @{
Name = $subnetName
VirtualNetwork = $virtualNetwork
AddressPrefix = $subnet.AddressPrefix
}
Set-AzVirtualNetworkSubnetConfig @subConfig
# Update the virtual network
Set-AzVirtualNetwork -VirtualNetwork $virtualNetwork
# Specify the resource group and NAT gateway name
$resourceGroupName = "test-rg"
$natGatewayName = "nat-gateway"
$nat = @{
Name = $natGatewayName
ResourceGroupName = $resourceGroupName
}
Remove-AzNatGateway @nat
## Create public IP address for NAT gateway ##
$ip = @{
Name = 'public-ip-nat2'
ResourceGroupName = 'test-rg'
Location = 'eastus2'
Sku = 'Standard'
AllocationMethod = 'Static'
}
New-AzPublicIpAddress @ip
## Place NAT gateway into a variable. ##
$ng = @{
Name = 'nat-gateway'
ResourceGroupName = 'test-rg'
}
$nat = Get-AzNatGateway @ng
## Place the existing public IP address associated with the NAT gateway into a variable. ##
$ip = @{
Name = 'public-ip-nat'
ResourceGroupName = 'test-rg'
}
$publicIP1 = Get-AzPublicIPaddress @ip
## Place the public IP address you created previously into a variable. ##
$ip = @{
Name = 'public-ip-nat2'
ResourceGroupName = 'test-rg'
}
$publicIP2 = Get-AzPublicIPaddress @ip
## Place the public IP address variables into an array. ##
$pipArray = $publicIP1,$publicIP2
## Add the IP address to the NAT gateway. ##
$nt = @{
NatGateway = $nat
PublicIpAddress = $pipArray
}
Set-AzNatGateway @nt
## Place NAT gateway into a variable. ##
$ng = @{
Name = 'nat-gateway'
ResourceGroupName = 'test-rg'
}
$nat = Get-AzNatGateway @ng
## Place the existing public IP address associated with the NAT gateway into a variable. ##
$ip = @{
Name = 'public-ip-nat'
ResourceGroupName = 'test-rg'
}
$publicIP1 = Get-AzPublicIPaddress @ip
## Place the second public IP address into a variable. ##
$ip = @{
Name = 'public-ip-nat2'
ResourceGroupName = 'test-rg'
}
$publicIP2 = Get-AzPublicIPAddress @ip
## Place ONLY the public IP you wish to keep in the array. ##
$pipArray = $publicIP1
## Add the public IP address to the NAT gateway. ##
$nt = @{
NatGateway = $nat
PublicIpAddress = $pipArray
}
Set-AzNatGateway @nt
## Create public IP prefix for NAT gateway ##
$ip = @{
Name = 'public-ip-prefix-nat2'
ResourceGroupName = 'test-rg'
Location = 'eastus2'
Sku = 'Standard'
PrefixLength = '29'
}
New-AzPublicIpPrefix @ip
## Place NAT gateway into a variable. ##
$ng = @{
Name = 'nat-gateway'
ResourceGroupName = 'test-rg'
}
$nat = Get-AzNatGateway @ng
## Place the existing public IP prefix associated with the NAT gateway into a variable. ##
$ip = @{
Name = 'public-ip-prefix-nat'
ResourceGroupName = 'test-rg'
}
$prefixIP1 = Get-AzPublicIPPrefix @ip
## Place the public IP prefix you created previously into a variable. ##
$ip = @{
Name = 'public-ip-prefix-nat2'
ResourceGroupName = 'test-rg'
}
$prefixIP2 = Get-AzPublicIPprefix @ip
## Place the public IP address variables into an array. ##
$preArray = $prefixIP1,$prefixIP2
## Add the IP address prefix to the NAT gateway. ##
$nt = @{
NatGateway = $nat
PublicIpPrefix = $preArray
}
Set-AzNatGateway @nt
## Place NAT gateway into a variable. ##
$ng = @{
Name = 'nat-gateway'
ResourceGroupName = 'test-rg'
}
$nat = Get-AzNatGateway @ng
## Place the existing public IP prefix associated with the NAT gateway into a variable. ##
$ip = @{
Name = 'public-ip-prefix-nat'
ResourceGroupName = 'test-rg'
}
$prefixIP1 = Get-AzPublicIPPrefix @ip
## Place the secondary public IP prefix into a variable. ##
$ip = @{
Name = 'public-ip-prefix-nat2'
ResourceGroupName = 'test-rg'
}
$prefixIP2 = Get-AzPublicIPprefix @ip
## Place ONLY the prefix you wish to keep in the array. DO NOT ADD THE SECONDARY VARIABLE ##
$preArray = $prefixIP1
## Add the IP address prefix to the NAT gateway. ##
$nt = @{
NatGateway = $nat
PublicIpPrefix = $preArray
}
Set-AzNatGateway @nt