Peering connections - az network vnet peering

Manage peering connections between Azure Virtual Networks.

Commands

az network vnet peering create Create a peering.
az network vnet peering delete Delete a peering.
az network vnet peering list List peerings.
az network vnet peering show Show details of a peering.
az network vnet peering update Update a peering.

az network vnet peering create

Create a peering.

az network vnet peering create --name
--remote-vnet-id
--resource-group
--vnet-name
[--allow-forwarded-traffic]
[--allow-gateway-transit]
[--allow-vnet-access]
[--use-remote-gateways]

Required Parameters

--name -n

The name of the VNet peering.

--remote-vnet-id

ID of the remote VNet.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-name

The virtual network (VNet) name.

Optional Parameters

--allow-forwarded-traffic

Allows forwarded traffic from the VMs in the remote VNet.

--allow-gateway-transit

Allows gateway link to be used in the remote VNet.

--allow-vnet-access

Allows VMs in the remote VNet to access all VMs in the local VNet.

--use-remote-gateways

Allows VNet to use the remote VNet's gateway. Remote VNet gateway must have --allow-gateway-transit enabled for remote peering. Only 1 peering can have this flag enabled. Cannot be set if the VNet already has a gateway.

az network vnet peering delete

Delete a peering.

az network vnet peering delete --name
--resource-group
--vnet-name

Required Parameters

--name -n

The name of the VNet peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-name

The virtual network (VNet) name.

az network vnet peering list

List peerings.

az network vnet peering list --resource-group
--vnet-name

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-name

The virtual network (VNet) name.

az network vnet peering show

Show details of a peering.

az network vnet peering show --name
--resource-group
--vnet-name

Required Parameters

--name -n

The name of the VNet peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-name

The virtual network (VNet) name.

az network vnet peering update

Update a peering.

az network vnet peering update --name
--resource-group
--vnet-name
[--add]
[--remove]
[--set]

Required Parameters

--name -n

The name of the VNet peering.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

--vnet-name

The virtual network (VNet) name.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.