File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments