Skip to content

Commit e6803d2

Browse files
fix: update identity query to exclude 'id-backend-' prefix
2 parents 47ed5ed + 786c4ab commit e6803d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infra/scripts/run_process_data_scripts.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ echo "Fetching Key Vault and Managed Identity from resource group: $resourceGrou
2525
keyVaultName=$(az keyvault list --resource-group "$resourceGroupName" --query "[0].name" -o tsv)
2626

2727
# === Retrieve the ID of the first user-assigned identity with name starting with 'id-' ===
28-
managedIdentityResourceId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-sql-')].id | [0]" -o tsv)
28+
managedIdentityResourceId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-backend-')].id | [0]" -o tsv)
2929

3030
# === Normalize managedIdentityResourceId (necessary for compatibility in Git Bash on Windows) ===
3131
managedIdentityResourceId=$(echo "$managedIdentityResourceId" | sed -E 's|.*(/subscriptions/)|\1|')
@@ -34,7 +34,7 @@ managedIdentityResourceId=$(echo "$managedIdentityResourceId" | sed -E 's|.*(/su
3434
sqlServerLocation=$(az sql server list --resource-group "$resourceGroupName" --query "[0].location" -o tsv)
3535

3636
# === Retrieve the principal ID of the first user-assigned identity with name starting with 'id-' ===
37-
managedIdentityClientId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-sql-')].clientId | [0]" -o tsv)
37+
managedIdentityClientId=$(az identity list --resource-group "$resourceGroupName" --query "[?starts_with(name, 'id-') && !starts_with(name, 'id-backend-')].clientId | [0]" -o tsv)
3838

3939
# === Check for VNet deployment ===
4040
echo "Checking for VNet deployment in resource group: $resourceGroupName"

0 commit comments

Comments
 (0)