Skip to content

Commit 7aeb236

Browse files
committed
added more CLI code to tabs
1 parent 3d93a19 commit 7aeb236

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

articles/nat-gateway/tutorial-hub-spoke-route-nat.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,28 @@ Create a two-way virtual network peer between the hub and spoke two.
11371137
11381138
# [**CLI**](#tab/cli)
11391139
1140+
Use [az network vnet peering create](/cli/azure/network/vnet/peering?view=azure-cli-latest#az_network_vnet_peering_create) to create the peering from the hub to spoke two.
1141+
1142+
```azurecli-interactive
1143+
# Create peering from hub to spoke two
1144+
az network vnet peering create \
1145+
--name vnet-hub-to-vnet-spoke-2 \
1146+
--resource-group test-rg \
1147+
--vnet-name vnet-hub \
1148+
--remote-vnet vnet-spoke-2 \
1149+
--allow-vnet-access \
1150+
--allow-forwarded-traffic
1151+
1152+
# Create peering from spoke two to hub
1153+
az network vnet peering create \
1154+
--name vnet-spoke-2-to-vnet-hub \
1155+
--resource-group test-rg \
1156+
--vnet-name vnet-spoke-2 \
1157+
--remote-vnet vnet-hub \
1158+
--allow-vnet-access \
1159+
--allow-forwarded-traffic
1160+
```
1161+
11401162
---
11411163
11421164
## Create spoke two network route table

0 commit comments

Comments
 (0)