Skip to content

Commit 1137a88

Browse files
Merge pull request #693 from microsoft/psl-postdeploymentscript-exp
fix: Cross subscription issue while running post deployments scrip
2 parents fe67217 + 1df8876 commit 1137a88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

infra/scripts/process_sample_data.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@
8181
aif_resource_name=$(basename "$aif_account_resource_id")
8282
# Extract resource group from the AI Foundry account resource ID
8383
aif_resource_group=$(echo "$aif_account_resource_id" | sed -n 's|.*/resourceGroups/\([^/]*\)/.*|\1|p')
84-
84+
# Extract subscription ID from the AI Foundry account resource ID
85+
aif_subscription_id=$(echo "$aif_account_resource_id" | sed -n 's|.*/subscriptions/\([^/]*\)/.*|\1|p')
86+
8587
original_foundry_public_access=$(az cognitiveservices account show \
8688
--name "$aif_resource_name" \
8789
--resource-group "$aif_resource_group" \
90+
--subscription "$aif_subscription_id" \
8891
--query "properties.publicNetworkAccess" \
8992
--output tsv)
9093
if [ -z "$original_foundry_public_access" ] || [ "$original_foundry_public_access" = "null" ]; then

0 commit comments

Comments
 (0)