Skip to content

Commit 85b4f2f

Browse files
author
sivakami
committed
Link private endpoint dns to vnet a2 and vnet a3.
1 parent 3e502fa commit 85b4f2f

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ SUBSCRIPTION_ID=$1
66
LOCATION=$2
77
RG=$3
88
SA1_NAME=$4 # Storage account 1
9+
910
VNET_A1="cx_vnet_a1"
11+
VNET_A2="cx_vnet_a2"
12+
VNET_A3="cx_vnet_a3"
1013
SUBNET_PE_A1="pe"
1114
PE_NAME="${SA1_NAME}-pe"
1215
PRIVATE_DNS_ZONE="privatelink.blob.core.windows.net"
13-
LINK_NAME="${VNET_A1}-link"
1416

1517
# 1. Create Private DNS zone
1618
echo "==> Creating Private DNS zone: $PRIVATE_DNS_ZONE"
@@ -20,12 +22,27 @@ az network private-dns zone create -g "$RG" -n "$PRIVATE_DNS_ZONE" --output none
2022
# 2. Link DNS zone to VNet
2123
echo "==> Linking DNS zone $PRIVATE_DNS_ZONE to VNet $VNET_A1"
2224
az network private-dns link vnet create \
23-
-g "$RG" -n "$LINK_NAME" \
25+
-g "$RG" -n "${VNET_A1}-link" \
2426
--zone-name "$PRIVATE_DNS_ZONE" \
2527
--virtual-network "$VNET_A1" \
26-
--registration-enabled false --output none \
28+
--registration-enabled false \
2729
&& echo "[OK] Linked DNS zone to $VNET_A1."
2830

31+
az network private-dns link vnet create \
32+
-g "$RG" -n "${VNET_A2}-link" -\
33+
-zone-name "$PRIVATE_DNS_ZONE" \
34+
--virtual-network "$VNET_A2" \
35+
--registration-enabled false \
36+
&& echo "[OK] Linked DNS zone to $VNET_A2."
37+
38+
az network private-dns link vnet create \
39+
-g "$RG" -n "${VNET_A3}-link" \
40+
--zone-name "$PRIVATE_DNS_ZONE" \
41+
--virtual-network "$VNET_A3" \
42+
--registration-enabled false \
43+
&& echo "[OK] Linked DNS zone to $VNET_A3."
44+
45+
2946
# 3. Create Private Endpoint
3047
echo "==> Creating Private Endpoint for Storage Account: $SA1_NAME"
3148
SA1_ID=$(az storage account show -g "$RG" -n "$SA1_NAME" --query id -o tsv)

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ A1_S2="10.10.2.0/24"
1919
A1_PE="10.10.100.0/24"
2020

2121
A2_MAIN="10.11.1.0/24"
22-
A2_PE="10.11.100.0/24"
2322

2423
A3_MAIN="10.12.1.0/24"
25-
A3_PE="10.12.100.0/24"
2624

2725
B1_MAIN="10.20.1.0/24"
2826

@@ -37,14 +35,10 @@ az network vnet subnet create -g "$RG" --vnet-name "$VNET_A1" -n pe --address-pr
3735
# A2
3836
az network vnet create -g "$RG" -n "$VNET_A2" --address-prefix 10.11.0.0/16 --subnet-name s1 --subnet-prefix "$A2_MAIN" -l "$LOCATION" --output none \
3937
&& echo "Created $VNET_A2 with subnet s1"
40-
az network vnet subnet create -g "$RG" --vnet-name "$VNET_A2" -n pe --address-prefix "$A2_PE" --output none \
41-
&& echo "Created $VNET_A2 with subnet pe"
4238

4339
# A3
4440
az network vnet create -g "$RG" -n "$VNET_A3" --address-prefix 10.12.0.0/16 --subnet-name s1 --subnet-prefix "$A3_MAIN" -l "$LOCATION" --output none \
4541
&& echo "Created $VNET_A3 with subnet s1"
46-
az network vnet subnet create -g "$RG" --vnet-name "$VNET_A3" -n pe --address-prefix "$A3_PE" --output none \
47-
&& echo "Created $VNET_A3 with subnet pe"
4842

4943
# B1
5044
az network vnet create -g "$RG" -n "$VNET_B1" --address-prefix 10.20.0.0/16 --subnet-name s1 --subnet-prefix "$B1_MAIN" -l "$LOCATION" --output none \

0 commit comments

Comments
 (0)