Weekly Azure Refresh
The weekly-azure-refresh Cloud Run job bridges legacy Azure data sources while partners finalize their migration to GCP. It imports structured records from Azure SQL and search indexes from Azure Cognitive Search into Firestore and Vertex AI Search.
Schedule & Trigger
Frequency: Every Monday at 11:00 UTC (configured via Cloud Scheduler in
infra/environments/dev/terraform.tfvars).Location:
us-central1Cloud Run job running imageweekly-refresh-job:dev.Runtime Service Account:
[email protected]withroles/discoveryengine.editor(grant pending in production apply).
Networking
Uses the
serverless-egressVPC connector andserverless-egress-natto reach Azure resources with static IP136.119.111.184.Azure SQL firewall must allow the static IP. See the planning change log for the latest approval status.
NAT is currently configured with
ENDPOINT_TYPE_SERVERLESS; verify whether VM workloads still depend on the NAT before applying to production.
Secrets & Configuration
The job consumes three secrets from Secret Manager:
AZURE_SQL_CONNECTION_STRING
azure-sql-connection-string
SQL auth string for Azure intake database
AZURE_STORAGE_CONNECTION_STRING
azure-storage-connection-string
Access to blob exports
AZURE_SEARCH_ADMIN_KEY
azure-search-admin-key
Admin key for Cognitive Search exports
Use proto/scripts/infra/add_azure_secrets.py to rotate these values.
Execution Flow
Download latest exports or query Azure SQL directly.
Transform data to Firestore schema, ensuring idempotent writes.
Update Vertex AI Search documents for semantic retrieval.
Produce a JSON summary report (
data/weekly_refresh_<date>.json) for auditing.
Troubleshooting
Firewall Denied (
42000): Azure SQL hasn’t allowed the static IP yet. Request firewall rule update and retry.Login Timeout (
HYT00): Connector configured correctly but Azure unreachable—check VPC connector health and NAT logs (resource.type="nat_gateway").Discovery Permission Denied: Ensure the ingestion service account has
roles/discoveryengine.editorin the target project.
Run Manually
Review execution logs via gcloud logging read or Cloud Console. Capture successful runs in the planning change log to maintain operational traceability.
Last updated