Skip to content

Commit

Permalink
fix query for NSG in demo scripts (#988)
Browse files Browse the repository at this point in the history
select the proper customer RG when querying for the NSG.

Signed-off-by: Gerd Oberlechner <[email protected]>
  • Loading branch information
geoberle authored Dec 14, 2024
1 parent 576d9f1 commit 02ea8a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/03-create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CURRENT_DATE=$(date -u +"%Y-%m-%dT%H:%M:%S+00:00")
CLUSTER_TMPL_FILE="cluster.tmpl.json"
CLUSTER_FILE="cluster.json"

NSG_ID=$(az network nsg list --query "[?name=='${CUSTOMER_NSG}'].id" -o tsv)
NSG_ID=$(az network nsg list -g ${CUSTOMER_RG_NAME} --query "[?name=='${CUSTOMER_NSG}'].id" -o tsv)
SUBNET_ID=$(az network vnet subnet show -g ${CUSTOMER_RG_NAME} --vnet-name ${CUSTOMER_VNET_NAME} --name ${CUSTOMER_VNET_SUBNET1} --query id -o tsv)
SUBSCRIPTION_ID=$(az account show --query id -o tsv)

Expand Down
4 changes: 3 additions & 1 deletion demo/env_vars
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash


export CUSTOMER_RG_NAME="$USER-net-rg"
if [ -z "$CUSTOMER_RG_NAME" ]; then
export CUSTOMER_RG_NAME="$USER-net-rg"
fi
export CUSTOMER_VNET_NAME="customer-vnet"
export CUSTOMER_VNET_SUBNET1="customer-subnet-1"
export CUSTOMER_NSG="customer-nsg"
Expand Down

0 comments on commit 02ea8a6

Please sign in to comment.