Skip to content

Commit a604f09

Browse files
feat: Add dependency management for cognitive service deployments and improve SQL Server public access feedback in scripts
1 parent 96fabfa commit a604f09

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

infra/modules/dependencies.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ module cognitiveService_privateEndpoints 'br/public:avm/res/network/private-endp
303303
applicationSecurityGroupResourceIds: privateEndpoint.?applicationSecurityGroupResourceIds
304304
customNetworkInterfaceName: privateEndpoint.?customNetworkInterfaceName
305305
}
306+
dependsOn: [
307+
cognitiveService_deployments
308+
]
306309
}
307310
]
308311

infra/scripts/process_sample_data.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ enable_public_access() {
179179
--resource-group "$resourceGroupName" \
180180
--enable-public-network true \
181181
--output none
182-
echo "✓ SQL Server public access enabled"
182+
if [ $? -eq 0 ]; then
183+
echo "✓ SQL Server public access enabled"
184+
else
185+
echo "✗ Failed to enable SQL Server public access"
186+
return 1
187+
fi
183188
else
184189
echo "✓ SQL Server public access already enabled"
185190
fi
@@ -338,17 +343,6 @@ restore_network_access() {
338343
echo "SQL Server access unchanged (already at desired state)"
339344
fi
340345

341-
# Remove temporary allow-all firewall rule if we created it
342-
if [ "$created_sql_allow_all_firewall_rule" = "true" ] && [ "$original_full_range_rule_present" != "true" ]; then
343-
echo "Removing temporary allow-all firewall rule..."
344-
az sql server firewall-rule delete \
345-
--resource-group "$resourceGroupName" \
346-
--server "$sqlServerName" \
347-
--name "TempAllowAll" \
348-
--output none 2>/dev/null
349-
echo "✓ Temporary firewall rule removed"
350-
fi
351-
352346
echo "=== Network access restoration completed ==="
353347
}
354348

0 commit comments

Comments
 (0)