Skip to content

Commit 9b18316

Browse files
fix(azure): add resource group scoping and fix Key Vault naming
Add --resource-group parameter to network NSG and VNet list commands the Azure CLI now requires --resource-group for 'az network vnet list', which fixes issue where GetVnetID becomes empty on basic HC creation Also updated Key Vault name from "${PREFIX}" to "${PREFIX}-kv" so that the KV name isn't just a prefix
1 parent 652dbf2 commit 9b18316

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

contrib/managed-azure/create_basic_hosted_cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ az group create --name "${CUSTOMER_NSG_RG_NAME}" --location ${LOCATION}
4242
az network nsg create --resource-group "${CUSTOMER_NSG_RG_NAME}" --name "${CUSTOMER_NSG}"
4343

4444
# Get customer nsg ID
45-
GetNsgID=$(az network nsg list --query "[?name=='${CUSTOMER_NSG}'].id" -o tsv)
45+
GetNsgID=$(az network nsg list --resource-group "${CUSTOMER_NSG_RG_NAME}" --query "[?name=='${CUSTOMER_NSG}'].id" -o tsv)
4646

4747
# Create customer vnet in customer resource group
4848
az network vnet create \
@@ -54,7 +54,7 @@ az network vnet create \
5454
--nsg "${GetNsgID}"
5555

5656
# Get customer vnet ID
57-
GetVnetID=$(az network vnet list --query "[?name=='${CUSTOMER_VNET_NAME}'].id" -o tsv)
57+
GetVnetID=$(az network vnet list --resource-group "${CUSTOMER_VNET_RG_NAME}" --query "[?name=='${CUSTOMER_VNET_NAME}'].id" -o tsv)
5858

5959
# Get customer subnet ID
6060
GetSubnetID=$(az network vnet subnet show --vnet-name "${CUSTOMER_VNET_NAME}" --name "${CUSTOMER_VNET_SUBNET1}" --resource-group "${CUSTOMER_VNET_RG_NAME}" --query id --output tsv)

contrib/managed-azure/setup_MIv3_kv.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ LOCATION=${LOCATION:?"Provide location"}
2323
CP_OUTPUT_FILE=${CP_OUTPUT_FILE:?"Provide cloud provider output file path"}
2424

2525
# Local.
26-
KV_NAME="${PREFIX}"
26+
KV_NAME="${PREFIX}-kv"
2727
AZURE_DISK_SP_NAME="azure-disk-$PREFIX"
2828
AZURE_FILE_SP_NAME="azure-file-$PREFIX"
2929

0 commit comments

Comments
 (0)