File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22set -eu
33
44ENV_CONFIG=" $1 "
5+ SUBSCRIPTION=" $2 "
56
67enterpriseAppName=" spn-manbrs-web-api-${ENV_CONFIG} "
78rgName=" rg-mbsgw-${ENV_CONFIG} -uks-arc-enabled-servers"
@@ -20,7 +21,7 @@ echo "SP object ID: $spObjectId"
2021echo " App role ($appRoleValue ): $appRoleId "
2122
2223echo " Listing Arc machines in: $rgName "
23- arcMachines=$( az connectedmachine list --resource-group " $rgName " --query " [].name" -o tsv)
24+ arcMachines=$( az connectedmachine list --resource-group " $rgName " --subscription " $SUBSCRIPTION " -- query " [].name" -o tsv)
2425
2526if [ -z " $arcMachines " ]; then
2627 echo " No Arc machines found in $rgName "
@@ -33,6 +34,7 @@ while IFS= read -r machine; do
3334 miPrincipalId=$( az connectedmachine show \
3435 --resource-group " $rgName " \
3536 --name " $machine " \
37+ --subscription " $SUBSCRIPTION " \
3638 --query " identity.principalId" -o tsv)
3739
3840 echo " Assigning $appRoleValue to $machine (MI: $miPrincipalId )..."
You can’t perform that action at this time.
0 commit comments