The Simplest Way to Make Azure Backup and Cloud Run Work Like They Should
Teams use azure backup and cloud run together to protect data across two clouds. Cloud Run apps trigger backup jobs or check backup status in Azure. This setup lets stateless apps manage recovery tasks without holding local state. Engineers can automate snapshot checks, restore tests, and alerts from one place. How azure backup and cloud run share identity and data Linking these two tools requires a trust link between Google Cloud and Azure. Each Cloud Run service runs with its own Google se
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams use azure backup and cloud run together to protect data across two clouds. Cloud Run apps trigger backup jobs or check backup status in Azure.
This setup lets stateless apps manage recovery tasks without holding local state. Engineers can automate snapshot checks, restore tests, and alerts from one place.
How azure backup and cloud run share identity and data
Linking these two tools requires a trust link between Google Cloud and Azure. Each Cloud Run service runs with its own Google service account identity.
Workload identity federation lets Azure trust that Google identity without static keys. The Cloud Run app requests an identity token from the local metadata server.
Next, the app sends this token to Azure Active Directory to log in. Azure checks the token and returns an access token for the backup vault.
Once logged in, the app calls Azure APIs to start or check backups. Data flows over HTTPS between the container instance and the Azure API endpoint.
When a job finishes, Azure can send an event back to the app. This loop keeps backup schedules and restore checks on track across both clouds.
Common failure modes and how to scope roles
Many teams start by putting static Azure client secrets inside Cloud Run variables. Static keys live too long and often leak into build logs or scripts.
Shared service accounts create another big risk for cloud teams. When five apps share one identity, you cannot tell which app ran a task.
Broad roles also cause trouble when an app has full admin rights. A bug in one container could delete backup vaults across the whole subscription.
Azure RBAC + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, give each Cloud Run service a single, dedicated identity. Map that identity to a narrow role scoped to one Azure vault.
Separate the role that triggers backups from the role that deletes or restores data. Most daily check apps only need read permissions on the vault status.
Securing network paths and audit logs across clouds
Public endpoints make cross-cloud calls easy to set up at first. Still, open network paths expose backup control APIs to wider traffic risks.
Teams should route outbound Cloud Run traffic through a controlled VPC connector. That path gives your apps a fixed IP range for outbound requests.
On the Azure side, restrict vault firewall rules to accept only those IPs. You can also use a private VPN tunnel between the two cloud networks.
Unlogged calls are another blind spot during an incident or audit. Make sure both clouds write every login and API call to central logs.
If a restore job reads user data, watch for sensitive fields in outputs. Data masking rewrites matched fields like emails, phone numbers, or card numbers in results.
Good logs show which app identity called which vault at what exact time. Clear audit trails help teams spot bad scripts or stolen tokens right away.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Can Cloud Run trigger Azure Backup jobs without storing static secrets?
Yes, you can set up workload identity federation between Google Cloud and Azure. The Cloud Run service exchanges its Google token for a short-lived Azure token.
How do we restrict which backup vaults a Cloud Run app can touch?
Assign the federated identity to an Azure role at the single vault level. Do not assign backup roles at the root subscription or resource group level.
What is the best way to handle large data restores with Cloud Run?
Cloud Run works best as a control plane that starts the restore job. Let Azure move the heavy data directly to your target storage or database.
Related guides
In this post