Skip to content

Commit e8b5ebb

Browse files
Merge pull request #572 from microsoft/exp-bug-fix
fix: Cross subscription issue while running post deployments script
2 parents 46dd3ea + 101da85 commit e8b5ebb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

infra/scripts/process_sample_data.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,13 @@ enable_public_access() {
7575
aif_resource_name=$(basename "$aif_account_resource_id")
7676
# Extract resource group from the AI Foundry account resource ID
7777
aif_resource_group=$(echo "$aif_account_resource_id" | sed -n 's|.*/resourceGroups/\([^/]*\)/.*|\1|p')
78+
# Extract subscription ID from the AI Foundry account resource ID
79+
aif_subscription_id=$(echo "$aif_account_resource_id" | sed -n 's|.*/subscriptions/\([^/]*\)/.*|\1|p')
7880

7981
original_foundry_public_access=$(az cognitiveservices account show \
8082
--name "$aif_resource_name" \
8183
--resource-group "$aif_resource_group" \
84+
--subscription "$aif_subscription_id" \
8285
--query "properties.publicNetworkAccess" \
8386
--output tsv)
8487
if [ -z "$original_foundry_public_access" ] || [ "$original_foundry_public_access" = "null" ]; then

0 commit comments

Comments
 (0)