@@ -141,13 +141,69 @@ For this, we run the virtual network peering create command with the optional pa
141
141
az network vnet peering create -n vnet-1_to_vnet-2
142
142
-g test-rg
143
143
-o none
144
+ --vnet-name vnet-1
145
+ --remote-vnet vnet-2
144
146
--allow-forwarded-traffic
145
147
--allow-gateway-transit
146
148
--allow-vnet-access
147
- --peer-complete-vnet fasle
149
+ --peer-complete-vnet false
148
150
--local-subnet-names subnet-1
149
151
--remote-subnet-names subnet-3
152
+ az network vnet peering create -n vnet-2_to_vnet-1
153
+ -g test-rg
154
+ -o none
155
+ --vnet-name vnet-2
156
+ --remote-vnet vnet-1
157
+ --allow-forwarded-traffic
158
+ --allow-gateway-transit
159
+ --allow-vnet-access
160
+ --peer-complete-vnet false
161
+ --local-subnet-names subnet-3
162
+ --remote-subnet-names subnet-1
163
+ ```
164
+
165
+ ** Add a new subnet to peering**
166
+ ``` azurecli
167
+ az network vnet peering update -n vnet-1_to_vnet-2
168
+ -g test-rg
169
+ --vnet-name vnet-1
170
+ --local-subnet-names subnet-1 subnet-2
171
+ az network vnet peering update -n vnet-2_to_vnet-1
172
+ -g test-rg
173
+ --vnet-name vnet-2
174
+ --remote-subnet-names subnet-3 subnet-4
175
+ ```
150
176
177
+ ** Remove subnets to peering**
178
+ ``` azurecli
179
+ az network vnet peering update -n vnet-1_to_vnet-2
180
+ -g test-rg
181
+ --vnet-name vnet-1
182
+ --local-subnet-names subnet-1
183
+ az network vnet peering update -n vnet-2_to_vnet-1
184
+ -g test-rg
185
+ --vnet-name vnet-2
186
+ --remote-subnet-names subnet-3
187
+ ```
188
+
189
+ ** Sync peerings**
190
+ ``` azurecli
191
+ az network vnet peering sync -n vnet-1_to_vnet-2
192
+ -g test-rg
193
+ --vnet-name vnet-1
194
+ az network vnet peering sync -n vnet-2_to_vnet-1
195
+ -g test-rg
196
+ --vnet-name vnet-2
197
+ ```
198
+
199
+ ** Show peerings**
200
+ ``` azurecli
201
+ az network vnet peering show -n vnet-1_to_vnet-2
202
+ -g test-rg
203
+ --vnet-name vnet-1
204
+ az network vnet peering show -n vnet-2_to_vnet-1
205
+ -g test-rg
206
+ --vnet-name vnet-2
151
207
```
152
208
153
209
## Subnet Peering Checks and Limitations
0 commit comments