Skip to content

Commit 2f09acb

Browse files
updated script
1 parent 628ba2c commit 2f09acb

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

infra/scripts/process_sample_data.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,12 @@ enable_public_access() {
7373
if [ -z "$original_foundry_public_access" ] || [ "$original_foundry_public_access" = "null" ]; then
7474
echo "⚠ Info: Could not retrieve AI Foundry network access status."
7575
echo " AI Foundry network access might be managed differently."
76-
original_foundry_public_access="" # Clear this so we don't try to restore
7776
elif [ "$original_foundry_public_access" != "Enabled" ]; then
7877
echo "Current AI Foundry public access: $original_foundry_public_access"
7978
if MSYS_NO_PATHCONV=1 az resource update --ids "$aif_resource_id" --api-version 2024-10-01 --set properties.publicNetworkAccess=Enabled properties.apiProperties="{}" --output none; then
8079
echo "✓ AI Foundry public access enabled"
81-
original_foundry_public_access="Enabled"
8280
else
8381
echo "⚠ Warning: Failed to enable AI Foundry public access automatically."
84-
original_foundry_public_access="" # Clear this so we don't try to restore
8582
fi
8683
else
8784
echo "✓ AI Foundry public access already enabled"
@@ -150,7 +147,7 @@ restore_network_access() {
150147
fi
151148

152149
# Restore AI Foundry access
153-
if [ -n "$aif_resource_id" ] && [ -n "$original_foundry_public_access" ] && [ "$original_foundry_public_access" != "Enabled" ]; then
150+
if [ -n "$original_foundry_public_access" ] && [ "$original_foundry_public_access" != "Enabled" ]; then
154151
echo "Restoring AI Foundry public access to: $original_foundry_public_access"
155152
# Try using the working approach to restore the original setting
156153
if MSYS_NO_PATHCONV=1 az resource update --ids "$aif_resource_id" --api-version 2024-10-01 --set properties.publicNetworkAccess="$original_foundry_public_access" properties.apiProperties="{}" --output none 2>/dev/null; then

0 commit comments

Comments
 (0)