关于 Azure 私有网络与 GitHub 托管运行器
要将 GitHub 托管运行器与 Azure VNET 配合使用,首先配置您的 Azure 资源。然后在 GitHub 中创建私有网络配置。
以下步骤将引导您完成这两个步骤。
有关使用 GitHub 托管运行器与 Azure VNET 时常见问题的故障排除信息,请参阅“组织中 GitHub 托管运行器的 Azure 私有网络配置故障排除”。
配置 Azure 资源
您将使用脚本来自动配置 Azure 资源。
先决条件
-
使用具有订阅参与者角色和网络参与者角色的 Azure 帐户。这些角色使您能够注册
GitHub.Network
资源提供程序并委派子网。有关详细信息,请参阅 Microsoft Learn 上的 Azure 内置角色。 -
为了将子网正确地与正确的用户关联,必须在创建虚拟网络的相同订阅中创建 Azure
NetworkSettings
资源。 -
为了确保资源可用性/数据驻留,资源必须在同一个 Azure 区域创建。
-
保存以下
.bicep
文件。将文件命名为actions-nsg-deployment.bicep
。注意: 或者,为了允许 GitHub Actions 与运行器通信,您可以允许与自托管运行器和 GitHub 之间通信所需的相同防火墙域。有关更多信息,请参阅 "关于自托管运行器。" 为了确定合适的子网 IP 地址范围,我们建议在您预计的最大作业并发量上增加 30% 的缓冲。例如,如果您的网络配置的运行器设置为最大作业并发量为 300,则建议使用可以容纳至少 390 个运行器的子网 IP 地址范围。此缓冲有助于确保您的网络能够处理 VM 需求的意外增加以满足作业并发量,而不会耗尽 IP 地址。
Bicep @description('NSG for outbound rules') param location string param nsgName string = 'actions_NSG' resource actions_NSG 'Microsoft.Network/networkSecurityGroups@2017-06-01' = { name: nsgName location: location properties: { securityRules: [ { name: 'AllowVnetOutBoundOverwrite' properties: { protocol: 'TCP' sourcePortRange: '*' destinationPortRange: '443' sourceAddressPrefix: '*' destinationAddressPrefix: 'VirtualNetwork' access: 'Allow' priority: 200 direction: 'Outbound' destinationAddressPrefixes: [] } } { name: 'AllowOutBoundActions' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' access: 'Allow' priority: 210 direction: 'Outbound' destinationAddressPrefixes: [ '4.175.114.51/32' '20.102.35.120/32' '4.175.114.43/32' '20.72.125.48/32' '20.19.5.100/32' '20.7.92.46/32' '20.232.252.48/32' '52.186.44.51/32' '20.22.98.201/32' '20.246.184.240/32' '20.96.133.71/32' '20.253.2.203/32' '20.102.39.220/32' '20.81.127.181/32' '52.148.30.208/32' '20.14.42.190/32' '20.85.159.192/32' '52.224.205.173/32' '20.118.176.156/32' '20.236.207.188/32' '20.242.161.191/32' '20.166.216.139/32' '20.253.126.26/32' '52.152.245.137/32' '40.118.236.116/32' '20.185.75.138/32' '20.96.226.211/32' '52.167.78.33/32' '20.105.13.142/32' '20.253.95.3/32' '20.221.96.90/32' '51.138.235.85/32' '52.186.47.208/32' '20.7.220.66/32' '20.75.4.210/32' '20.120.75.171/32' '20.98.183.48/32' '20.84.200.15/32' '20.14.235.135/32' '20.10.226.54/32' '20.22.166.15/32' '20.65.21.88/32' '20.102.36.236/32' '20.124.56.57/32' '20.94.100.174/32' '20.102.166.33/32' '20.31.193.160/32' '20.232.77.7/32' '20.102.38.122/32' '20.102.39.57/32' '20.85.108.33/32' '40.88.240.168/32' '20.69.187.19/32' '20.246.192.124/32' '20.4.161.108/32' '20.22.22.84/32' '20.1.250.47/32' '20.237.33.78/32' '20.242.179.206/32' '40.88.239.133/32' '20.121.247.125/32' '20.106.107.180/32' '20.22.118.40/32' '20.15.240.48/32' '20.84.218.150/32' ] } } { name: 'AllowOutBoundGitHub' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' access: 'Allow' priority: 220 direction: 'Outbound' destinationAddressPrefixes: [ '140.82.112.0/20' '143.55.64.0/20' '185.199.108.0/22' '192.30.252.0/22' '20.175.192.146/32' '20.175.192.147/32' '20.175.192.149/32' '20.175.192.150/32' '20.199.39.227/32' '20.199.39.228/32' '20.199.39.231/32' '20.199.39.232/32' '20.200.245.241/32' '20.200.245.245/32' '20.200.245.246/32' '20.200.245.247/32' '20.200.245.248/32' '20.201.28.144/32' '20.201.28.148/32' '20.201.28.149/32' '20.201.28.151/32' '20.201.28.152/32' '20.205.243.160/32' '20.205.243.164/32' '20.205.243.165/32' '20.205.243.166/32' '20.205.243.168/32' '20.207.73.82/32' '20.207.73.83/32' '20.207.73.85/32' '20.207.73.86/32' '20.207.73.88/32' '20.233.83.145/32' '20.233.83.146/32' '20.233.83.147/32' '20.233.83.149/32' '20.233.83.150/32' '20.248.137.48/32' '20.248.137.49/32' '20.248.137.50/32' '20.248.137.52/32' '20.248.137.55/32' '20.26.156.216/32' '20.27.177.113/32' '20.27.177.114/32' '20.27.177.116/32' '20.27.177.117/32' '20.27.177.118/32' '20.29.134.17/32' '20.29.134.18/32' '20.29.134.19/32' '20.29.134.23/32' '20.29.134.24/32' '20.87.245.0/32' '20.87.245.1/32' '20.87.245.4/32' '20.87.245.6/32' '20.87.245.7/32' '4.208.26.196/32' '4.208.26.197/32' '4.208.26.198/32' '4.208.26.199/32' '4.208.26.200/32' ] } } { name: 'AllowStorageOutbound' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' destinationAddressPrefix: 'Storage' access: 'Allow' priority: 230 direction: 'Outbound' destinationAddressPrefixes: [] } } { name: 'DenyInternetOutBoundOverwrite' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' destinationAddressPrefix: 'Internet' access: 'Deny' priority: 400 direction: 'Outbound' } } ] } }
@description('NSG for outbound rules') param location string param nsgName string = 'actions_NSG' resource actions_NSG 'Microsoft.Network/networkSecurityGroups@2017-06-01' = { name: nsgName location: location properties: { securityRules: [ { name: 'AllowVnetOutBoundOverwrite' properties: { protocol: 'TCP' sourcePortRange: '*' destinationPortRange: '443' sourceAddressPrefix: '*' destinationAddressPrefix: 'VirtualNetwork' access: 'Allow' priority: 200 direction: 'Outbound' destinationAddressPrefixes: [] } } { name: 'AllowOutBoundActions' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' access: 'Allow' priority: 210 direction: 'Outbound' destinationAddressPrefixes: [ '4.175.114.51/32' '20.102.35.120/32' '4.175.114.43/32' '20.72.125.48/32' '20.19.5.100/32' '20.7.92.46/32' '20.232.252.48/32' '52.186.44.51/32' '20.22.98.201/32' '20.246.184.240/32' '20.96.133.71/32' '20.253.2.203/32' '20.102.39.220/32' '20.81.127.181/32' '52.148.30.208/32' '20.14.42.190/32' '20.85.159.192/32' '52.224.205.173/32' '20.118.176.156/32' '20.236.207.188/32' '20.242.161.191/32' '20.166.216.139/32' '20.253.126.26/32' '52.152.245.137/32' '40.118.236.116/32' '20.185.75.138/32' '20.96.226.211/32' '52.167.78.33/32' '20.105.13.142/32' '20.253.95.3/32' '20.221.96.90/32' '51.138.235.85/32' '52.186.47.208/32' '20.7.220.66/32' '20.75.4.210/32' '20.120.75.171/32' '20.98.183.48/32' '20.84.200.15/32' '20.14.235.135/32' '20.10.226.54/32' '20.22.166.15/32' '20.65.21.88/32' '20.102.36.236/32' '20.124.56.57/32' '20.94.100.174/32' '20.102.166.33/32' '20.31.193.160/32' '20.232.77.7/32' '20.102.38.122/32' '20.102.39.57/32' '20.85.108.33/32' '40.88.240.168/32' '20.69.187.19/32' '20.246.192.124/32' '20.4.161.108/32' '20.22.22.84/32' '20.1.250.47/32' '20.237.33.78/32' '20.242.179.206/32' '40.88.239.133/32' '20.121.247.125/32' '20.106.107.180/32' '20.22.118.40/32' '20.15.240.48/32' '20.84.218.150/32' ] } } { name: 'AllowOutBoundGitHub' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' access: 'Allow' priority: 220 direction: 'Outbound' destinationAddressPrefixes: [ '140.82.112.0/20' '143.55.64.0/20' '185.199.108.0/22' '192.30.252.0/22' '20.175.192.146/32' '20.175.192.147/32' '20.175.192.149/32' '20.175.192.150/32' '20.199.39.227/32' '20.199.39.228/32' '20.199.39.231/32' '20.199.39.232/32' '20.200.245.241/32' '20.200.245.245/32' '20.200.245.246/32' '20.200.245.247/32' '20.200.245.248/32' '20.201.28.144/32' '20.201.28.148/32' '20.201.28.149/32' '20.201.28.151/32' '20.201.28.152/32' '20.205.243.160/32' '20.205.243.164/32' '20.205.243.165/32' '20.205.243.166/32' '20.205.243.168/32' '20.207.73.82/32' '20.207.73.83/32' '20.207.73.85/32' '20.207.73.86/32' '20.207.73.88/32' '20.233.83.145/32' '20.233.83.146/32' '20.233.83.147/32' '20.233.83.149/32' '20.233.83.150/32' '20.248.137.48/32' '20.248.137.49/32' '20.248.137.50/32' '20.248.137.52/32' '20.248.137.55/32' '20.26.156.216/32' '20.27.177.113/32' '20.27.177.114/32' '20.27.177.116/32' '20.27.177.117/32' '20.27.177.118/32' '20.29.134.17/32' '20.29.134.18/32' '20.29.134.19/32' '20.29.134.23/32' '20.29.134.24/32' '20.87.245.0/32' '20.87.245.1/32' '20.87.245.4/32' '20.87.245.6/32' '20.87.245.7/32' '4.208.26.196/32' '4.208.26.197/32' '4.208.26.198/32' '4.208.26.199/32' '4.208.26.200/32' ] } } { name: 'AllowStorageOutbound' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' destinationAddressPrefix: 'Storage' access: 'Allow' priority: 230 direction: 'Outbound' destinationAddressPrefixes: [] } } { name: 'DenyInternetOutBoundOverwrite' properties: { protocol: '*' sourcePortRange: '*' destinationPortRange: '*' sourceAddressPrefix: '*' destinationAddressPrefix: 'Internet' access: 'Deny' priority: 400 direction: 'Outbound' } } ] } }
1. 获取您组织的 databaseId
您可以使用以下 GraphQL 查询来检索您的组织 databaseId
。您将在下一步中使用组织 databaseId
作为 DATABASE_ID
环境变量的值。有关使用 GraphQL 的更多信息,请参阅 "使用 GraphQL 形成调用。"。
查询变量 | 描述 |
---|---|
login | 您组织帐户的登录名,您可以通过查看您组织的 URL 来识别,https://github.com/organizations/ORGANIZATION_LOGIN 。 |
query(
$login: String!
){
organization (login: $login)
{
login
databaseId
}
}
'
Variables
{
"login": "ORGANIZATION_LOGIN"
}
或者,您可以使用以下 curl 命令来查找您的 databaseId
。
curl -H "Authorization: Bearer BEARER_TOKEN" -X POST \ -d '{ "query": "query($login: String!) { organization (login: $login) { login databaseId } }" , "variables": { "login": "ORGANIZATION_LOGIN" } }' \ https://api.github.com/graphql
curl -H "Authorization: Bearer BEARER_TOKEN" -X POST \
-d '{ "query": "query($login: String!) { organization (login: $login) { login databaseId } }" ,
"variables": {
"login": "ORGANIZATION_LOGIN"
}
}' \
https://api.github.com/graphql
2. 使用脚本配置您的 Azure 资源
使用以下脚本为 Azure 私有网络设置子网。该脚本在同一个资源组中创建所有资源。
要使用该脚本,请使用实际值填充占位符环境变量值,并从 bash shell 或 Windows Subsystem for Linux 运行该脚本。
注意:
- 在您保存
actions-nsg-deployment.bicep
文件的同一目录中运行以下脚本。 - 设置
YOUR_AZURE_LOCATION
环境变量时,请使用您区域的名称。此值与您区域的显示名称不同。要查看名称和显示名称列表,请使用az account list-locations -o table
。 - 创建网络设置资源时,会将服务关联链接应用于您提供的子网。此链接可防止在 GitHub Actions 服务使用子网时意外删除子网。
- 如果您自定义此脚本以使用现有子网中的网络资源,则必须确保在将子网委派给 GitHub Actions 服务之前删除连接到该子网的任何现有网络接口 (NIC)。否则,该服务将无法将服务关联链接应用于子网。
#!/bin/bash # This script creates the following resources in the specified subscription: # - Resource group # - Network Security Group rules # - Virtual network (vnet) and subnet # - Network Settings with specified subnet and GitHub Organization database ID # # It also registers the `GitHub.Network` resource provider with the subscription, # delegates the created subnet to the Actions service via the `GitHub.Network/NetworkSettings` # resource type, and applies the NSG rules to the created subnet. # stop on failure set -e #set environment export AZURE_LOCATION=YOUR_AZURE_LOCATION export SUBSCRIPTION_ID=YOUR_SUBSCRIPTION_ID export RESOURCE_GROUP_NAME=YOUR_RESOURCE_GROUP_NAME export VNET_NAME=YOUR_VNET_NAME export SUBNET_NAME=YOUR_SUBNET_NAME export NSG_NAME=YOUR_NSG_NAME export NETWORK_SETTINGS_RESOURCE_NAME=YOUR_NETWORK_SETTINGS_RESOURCE_NAME export DATABASE_ID=YOUR_DATABASE_ID # These are the default values. You can adjust your address and subnet prefixes. export ADDRESS_PREFIX=10.0.0.0/16 export SUBNET_PREFIX=10.0.0.0/24 echo echo login to Azure . az login --output none echo echo set account context $SUBSCRIPTION_ID . az account set --subscription $SUBSCRIPTION_ID echo echo Register resource provider GitHub.Network . az provider register --namespace GitHub.Network echo echo Create resource group $RESOURCE_GROUP_NAME at $AZURE_LOCATION . az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION echo echo Create NSG rules deployed with 'actions-nsg-deployment.bicep' file . az deployment group create --resource-group $RESOURCE_GROUP_NAME --template-file ./actions-nsg-deployment.bicep --parameters location=$AZURE_LOCATION nsgName=$NSG_NAME echo echo Create vnet $VNET_NAME and subnet $SUBNET_NAME . az network vnet create --resource-group $RESOURCE_GROUP_NAME --name $VNET_NAME --address-prefix $ADDRESS_PREFIX --subnet-name $SUBNET_NAME --subnet-prefixes $SUBNET_PREFIX echo echo Delegate subnet to GitHub.Network/networkSettings and apply NSG rules . az network vnet subnet update --resource-group $RESOURCE_GROUP_NAME --name $SUBNET_NAME --vnet-name $VNET_NAME --delegations GitHub.Network/networkSettings --network-security-group $NSG_NAME echo echo Create network settings resource $NETWORK_SETTINGS_RESOURCE_NAME . az resource create --resource-group $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type GitHub.Network/networkSettings --properties "{ \"location\": \"$AZURE_LOCATION\", \"properties\" : { \"subnetId\": \"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME\", \"businessId\": \"$DATABASE_ID\" }}" --is-full-object --output table --query "{GitHubId:tags.GitHubId, name:name}" --api-version 2024-04-02 echo echo To clean up and delete resources run the following command: echo az group delete --resource-group $RESOURCE_GROUP_NAME
#!/bin/bash
# This script creates the following resources in the specified subscription:
# - Resource group
# - Network Security Group rules
# - Virtual network (vnet) and subnet
# - Network Settings with specified subnet and GitHub Organization database ID
#
# It also registers the `GitHub.Network` resource provider with the subscription,
# delegates the created subnet to the Actions service via the `GitHub.Network/NetworkSettings`
# resource type, and applies the NSG rules to the created subnet.
# stop on failure
set -e
#set environment
export AZURE_LOCATION=YOUR_AZURE_LOCATION
export SUBSCRIPTION_ID=YOUR_SUBSCRIPTION_ID
export RESOURCE_GROUP_NAME=YOUR_RESOURCE_GROUP_NAME
export VNET_NAME=YOUR_VNET_NAME
export SUBNET_NAME=YOUR_SUBNET_NAME
export NSG_NAME=YOUR_NSG_NAME
export NETWORK_SETTINGS_RESOURCE_NAME=YOUR_NETWORK_SETTINGS_RESOURCE_NAME
export DATABASE_ID=YOUR_DATABASE_ID
# These are the default values. You can adjust your address and subnet prefixes.
export ADDRESS_PREFIX=10.0.0.0/16
export SUBNET_PREFIX=10.0.0.0/24
echo
echo login to Azure
. az login --output none
echo
echo set account context $SUBSCRIPTION_ID
. az account set --subscription $SUBSCRIPTION_ID
echo
echo Register resource provider GitHub.Network
. az provider register --namespace GitHub.Network
echo
echo Create resource group $RESOURCE_GROUP_NAME at $AZURE_LOCATION
. az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION
echo
echo Create NSG rules deployed with 'actions-nsg-deployment.bicep' file
. az deployment group create --resource-group $RESOURCE_GROUP_NAME --template-file ./actions-nsg-deployment.bicep --parameters location=$AZURE_LOCATION nsgName=$NSG_NAME
echo
echo Create vnet $VNET_NAME and subnet $SUBNET_NAME
. az network vnet create --resource-group $RESOURCE_GROUP_NAME --name $VNET_NAME --address-prefix $ADDRESS_PREFIX --subnet-name $SUBNET_NAME --subnet-prefixes $SUBNET_PREFIX
echo
echo Delegate subnet to GitHub.Network/networkSettings and apply NSG rules
. az network vnet subnet update --resource-group $RESOURCE_GROUP_NAME --name $SUBNET_NAME --vnet-name $VNET_NAME --delegations GitHub.Network/networkSettings --network-security-group $NSG_NAME
echo
echo Create network settings resource $NETWORK_SETTINGS_RESOURCE_NAME
. az resource create --resource-group $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type GitHub.Network/networkSettings --properties "{ \"location\": \"$AZURE_LOCATION\", \"properties\" : { \"subnetId\": \"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME\", \"businessId\": \"$DATABASE_ID\" }}" --is-full-object --output table --query "{GitHubId:tags.GitHubId, name:name}" --api-version 2024-04-02
echo
echo To clean up and delete resources run the following command:
echo az group delete --resource-group $RESOURCE_GROUP_NAME
该脚本将返回创建的资源的完整有效负载。在创建的资源的有效负载中返回的 GitHubId
哈希值是您在配置 GitHub 中的网络配置时将在后续步骤中使用的网络设置资源 ID。
在 GitHub 中为您的组织创建网络配置
配置完 Azure 资源后,您可以通过在组织级别创建网络配置来使用 Azure 虚拟网络 (VNET) 进行私有网络。然后,您可以将该网络配置关联到运行器组。有关运行器组的更多信息,请参阅“控制对大型运行器的访问”。
将网络配置与运行器组关联后,该组中的所有运行器将能够访问已连接到基础配置的 Azure VNET。
先决条件
在 GitHub 中添加网络配置之前,请确保已配置 Azure 资源。有关更多信息,请参阅“为组织中的 GitHub 托管运行器配置私有网络”。
1. 为您的组织添加新的网络配置
- 在 GitHub 的右上角,选择您的个人资料照片,然后单击 您的组织.
- 在组织旁边,单击**设置**。
- 在左侧边栏中,单击**托管计算网络**。
- 单击**新建网络配置**下拉菜单。然后单击**Azure 私有网络**。
- 命名您的网络配置。
- 单击**添加 Azure 虚拟网络**。
- 在弹出窗口中,输入在为私有网络配置 Azure 资源时检索到的网络设置资源 ID。
- 单击**添加 Azure 虚拟网络**。
2. 为您的组织创建运行器组
注意:要使运行器组可供组织内的存储库访问,这些存储库必须在组织级别具有对该运行器组的访问权限。有关更多信息,请参阅“控制对大型运行器的访问”。
- 为您的组织创建一个新的运行器组。有关如何创建运行器组的更多信息,请参阅“控制对大型运行器的访问”。
- 要选择存储库访问策略,请选择 **存储库访问** 下拉菜单并点击一个策略。您可以将运行器组配置为可供特定存储库列表访问,或可供组织中的所有存储库访问。
- 在配置运行器组时,在“网络配置”下,使用下拉菜单选择您为 Azure VNET 创建的网络配置。
- 要创建组并应用策略,请点击 **创建组**。
3. 将 GitHub 托管运行器添加到组织运行器组
注意:将 GitHub 托管运行器添加到运行器组时,请选择您在之前的步骤中创建的运行器组。
- 将 GitHub 托管运行器添加到运行器组。有关更多信息,请参阅“管理大型运行器”。
4. 可选:管理网络配置
- 在 GitHub 的右上角,选择您的个人资料照片,然后单击 您的组织.
- 在组织旁边,单击**设置**。
- 在左侧边栏中,单击**托管计算网络**。
- 要编辑网络配置,在网络配置的右侧,点击 。然后点击 **编辑配置**。
- 要禁用网络配置,在网络配置的右侧,点击 。然后点击 **禁用**。
- 要删除网络配置,在网络配置的右侧,点击 。然后点击 **删除**。
删除子网
创建网络设置资源时,会将服务关联链接应用于您提供的子网。此链接可防止在 GitHub Actions 服务使用子网时意外删除子网。
要删除子网,需要先删除此服务关联链接。一旦网络设置资源被删除,服务关联链接将被安全地自动删除。
要删除网络设置资源,需要先删除使用它的网络配置。
-
在 GitHub 的右上角,选择您的个人资料照片,然后单击 您的组织.
-
在组织旁边,单击**设置**。
-
在左侧边栏中,单击**托管计算网络**。
-
打开使用您要删除的子网的网络配置。
-
查看使用网络配置的运行器组列表。
-
在右上角,点击“”按钮。然后点击 **删除配置**。
-
要删除网络设置资源并移除服务关联链接,请使用您自己的输入,并使用以下 Azure CLI 命令。有关更多信息,请参阅 Azure 命令行界面 (CLI) 文档。
Bash az account set --subscription $SUBSCRIPTION_ID az resource delete -g $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type 'GitHub.Network/networkSettings' --api-version '2023-11-01-preview'
az account set --subscription $SUBSCRIPTION_ID az resource delete -g $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type 'GitHub.Network/networkSettings' --api-version '2023-11-01-preview'
-
在 Azure 中删除子网。有关更多信息,请参阅 Microsoft Learn 上的 删除子网。