The Simplest Way to Make Azure VMs and BigQuery Work Like They Should
Teams pair azure vms and bigquery to run compute jobs on Microsoft cloud machines while querying analytics data on Google Cloud. This setup lets apps process data across both clouds without copying huge tables back and forth. Many teams start by putting static service account keys on their virtual machines. Static keys create a big risk if someone steals a file or snapshot. A better design uses short tokens and strict role rules across both clouds. How azure vms and bigquery share identity an
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 pair azure vms and bigquery to run compute jobs on Microsoft cloud machines while querying analytics data on Google Cloud. This setup lets apps process data across both clouds without copying huge tables back and forth.
Many teams start by putting static service account keys on their virtual machines. Static keys create a big risk if someone steals a file or snapshot. A better design uses short tokens and strict role rules across both clouds.
How azure vms and bigquery share identity and data
An Azure virtual machine can use a managed identity from its host cloud. Google Cloud can trust that Azure token through workload identity federation. The machine trades its local Azure token for a short Google Cloud token. No one has to create or save a permanent JSON key file.
Once the machine has a valid token, the app sends queries to the data warehouse. Google Cloud checks the mapped role before it runs any job. It verifies if the role can start a job and read the requested dataset. Query results then flow back over an encrypted link to the virtual machine.
Teams should keep data transfers small to cut down on network fees. Run heavy filters and joins inside the data warehouse first. Only pull the final summary rows back to the Azure virtual machine. This pattern keeps cross-cloud traffic fast and cheap.
Common failure modes in cross-cloud data jobs
The biggest mistake is sharing one wide service account across many virtual machines. When five apps share one identity, you cannot tell who ran a bad query. If one machine breaks, every app using that shared role stops working too.
Broad roles cause another major issue for data teams. An editor role at the project level lets a machine read or drop any table. Instead, grant read access only on the specific dataset that the app needs. Split job run permissions from table read permissions so each rule stays clear.
Azure RBAC + BigQuery IAM: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged queries also hurt security and cost control during daily operations. When developers log in to a machine and run manual queries, logs only show the machine name. You lose track of which person ran the query or read sensitive rows. Good setups tie every interactive query to a real human user identity.
Sensitive fields like emails, phone numbers, card numbers, and national IDs need extra care. Data masking rewrites matched fields in results before they reach the screen or app. This step stops raw personal details from landing on local virtual machine disks.
Network paths and cost controls between clouds
Public internet paths work for basic tests, but production jobs need tighter network rules. Teams can set up private routing or strict firewall rules on both sides. Limit outbound traffic from the virtual machine so it only reaches known cloud endpoints.
On the Google Cloud side, service perimeters can block data theft. A perimeter rule can allow queries only from approved external identities or network ranges. This stops an attacker from using a stolen token on an home laptop.
Cross-cloud jobs can also drive up big bills if a script enters a bad loop. Set daily byte limits on the data warehouse project or individual service accounts. When a broken job hits the limit, the warehouse stops running new queries right away. This simple check keeps a bug on a virtual machine from draining your budget.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How can an Azure VM talk to BigQuery without a JSON key file?
Enable a managed identity on the Azure VM and set up workload identity federation in Google Cloud. The VM trades its local Azure token for a short Google token at runtime.
How do we stop one Azure VM from reading every dataset?
Assign permissions at the dataset or table level instead of the project level. Give the mapped identity a project role that only starts jobs, then grant read access on one dataset.
How can we protect emails and card numbers in cross-cloud queries?
Apply column policies and data masking rules that rewrite matched fields in results. This ensures queries return masked values for emails, phone numbers, card numbers, and national IDs.
Related guides
In this post