File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
.pipelines/swiftv2-long-running/scripts Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ az network nsg create -g "$RG" -n "$NSG_NAME" -l "$LOCATION" --output none \
1717
1818echo " ==> Creating NSG rule to DENY traffic from Subnet1 ($SUBNET1_PREFIX ) to Subnet2 ($SUBNET2_PREFIX )"
1919az network nsg rule create \
20- -g " $RG " \
20+ --resource-group " $RG " \
2121 --nsg-name " $NSG_NAME " \
22- -n deny-subnet1-to-subnet2 \
22+ --name deny-subnet1-to-subnet2 \
2323 --priority 100 \
2424 --source-address-prefixes " $SUBNET1_PREFIX " \
2525 --destination-address-prefixes " $SUBNET2_PREFIX " \
@@ -32,9 +32,9 @@ az network nsg rule create \
3232
3333echo " ==> Creating NSG rule to DENY traffic from Subnet2 ($SUBNET2_PREFIX ) to Subnet1 ($SUBNET1_PREFIX )"
3434az network nsg rule create \
35- -g " $RG " \
35+ --resource-group " $RG " \
3636 --nsg-name " $NSG_NAME " \
37- -n deny-subnet2-to-subnet1 \
37+ --name deny-subnet2-to-subnet1 \
3838 --priority 200 \
3939 --source-address-prefixes " $SUBNET2_PREFIX " \
4040 --destination-address-prefixes " $SUBNET1_PREFIX " \
@@ -45,4 +45,8 @@ 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
50+
4851echo " NSG '$NSG_NAME ' created successfully with bidirectional isolation between Subnet1 and Subnet2."
52+
You can’t perform that action at this time.
0 commit comments