File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545 timeout-minutes : 30
4646 outputs :
4747 mi_client_id : ${{ steps.identity.outputs.mi_client_id }}
48- subnet_aks_id : ${{ steps.network.outputs.subnet_aks_id }}
4948
5049 steps :
5150 # ── 1a. Azure Login (OIDC from GitHub-hosted runner) ───────
@@ -319,11 +318,20 @@ jobs:
319318 - name : Deploy Private AKS Cluster
320319 id : deploy
321320 run : |
322- SUBNET_AKS_ID="${{ needs.setup-runner.outputs.subnet_aks_id }}"
321+ SUBNET_AKS_ID=$(az network vnet subnet show \
322+ --resource-group "$INFRA_RG" \
323+ --vnet-name "$VNET_NAME" \
324+ --name "$SUBNET_AKS" \
325+ --query id -o tsv)
323326
324327 echo "Deploying private AKS cluster into subnet-aks..."
325328 echo " Subnet ID: $SUBNET_AKS_ID"
326329
330+ if [ -z "$SUBNET_AKS_ID" ]; then
331+ echo "::error::Failed to resolve subnet ID for $SUBNET_AKS in $VNET_NAME"
332+ exit 1
333+ fi
334+
327335 az aks create \
328336 --resource-group "$AKS_RG" \
329337 --name "$CLUSTER_NAME" \
You can’t perform that action at this time.
0 commit comments