Skip to content

Commit 709ec92

Browse files
authored
Changed MCRGNAME to query nodeResourceGroup instead of hardcoding
1 parent 82e1163 commit 709ec92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/aks/web-app-routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ LOCATION=<Location>
141141
# Retrieve user managed identity object ID for the add-on
142142
SUBSCRIPTION_ID=$(az account show --query id --output tsv)
143143
MANAGEDIDENTITYNAME="webapprouting-${CLUSTERNAME}"
144-
MCRGNAME="MC_${RGNAME}_${CLUSTERNAME}_${LOCATION}"
144+
MCRGNAME=$(az aks show -g ${RGNAME} -n ${CLUSTERNAME} --query nodeResourceGroup -o tsv)
145145
USERMANAGEDIDENTITY_RESOURCEID="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${MCRGNAME}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${MANAGEDIDENTITYNAME}"
146146
MANAGEDIDENTITY_OBJECTID=$(az resource show --id $USERMANAGEDIDENTITY_RESOURCEID --query "properties.principalId" -o tsv | tr -d '[:space:]')
147147
```

0 commit comments

Comments
 (0)