Skip to content

Commit 7fed3d5

Browse files
author
sivakami
committed
Link nsg with subnet.
1 parent ebcc301 commit 7fed3d5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.pipelines/swiftv2-long-running/scripts/create_nsg.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,19 @@ az network nsg rule create \
4545
--output none \
4646
&& echo "[OK] Deny rule from Subnet2 → Subnet1 created."
4747

48-
az network vnet subnet update --name s1 --vnet-name cx_vnet_a1 --resource-group "$RG" --network-security-group cx_nsg_a1
49-
az network vnet subnet update --name s2 --vnet-name cx_vnet_a1 --resource-group "$RG" --network-security-group cx_nsg_a1
48+
az network vnet subnet update \
49+
--name s1 \
50+
--vnet-name "$VNET_A1" \
51+
--resource-group "$RG" \
52+
--network-security-group "$NSG_NAME" \
53+
--output none
54+
55+
az network vnet subnet update \
56+
--name s2 \
57+
--vnet-name "$VNET_A1" \
58+
--resource-group "$RG" \
59+
--network-security-group "$NSG_NAME" \
60+
--output none
5061

5162
echo "NSG '$NSG_NAME' created successfully with bidirectional isolation between Subnet1 and Subnet2."
5263

0 commit comments

Comments
 (0)