Google Cloud Preparation
Creating a BYOC warehouse on Google Cloud involves the following Google Cloud-side tasks:
- Prepare a VPC and subnet.
- (Optional) Review the Terraform template and the resources it creates.
Prepare an existing VPC and subnet
Use an existing VPC only when it and its subnet meet the region, availability-zone, and subnet requirements for the BYOC warehouse. If no VPC and subnet meet these requirements, create them in advance.
Note:
If a VPC and subnet already meet the region, availability zone, and subnet requirements and you want to deploy the BYOC warehouse into them, skip the steps below. For the supported regions, see Supported Regions.
Create a VPC and subnet
-
Open the Google Cloud VPC networks console.

-
Click VPC networks > CREATE VPC NETWORK to open the VPC creation page.
-
Enter a VPC Name and select Custom mode.

-
Enter a subnet Name, select a supported Region, and enter an IPv4 range. See Supported Regions.
-
Turn off Private Google Access, Flow logs, and Hybrid subnet.

-
Clear all checkboxes under Firewall rules.

-
Select Regional for Dynamic routing mode, and Legacy for Best path selection mode.

-
Click CREATE to finish creating the VPC and subnet.
For more information, see the Google Cloud documentation for creating and managing VPC networks.
Review the Terraform template and resources (optional)
Note:
This section is for review only. The service account permissions below describe access granted by the template, not a complete policy for the person running it.
The account running the deployment command needs permission to create the template's resources, including service accounts, a custom IAM role, project and bucket IAM bindings, Cloud Storage HMAC keys, Compute Engine instances, and network resources. It also needs permission to enable the required Google Cloud APIs. If you lack these permissions, ask your Google Cloud administrator to run the command.
Review the Terraform template
The VeloDB Cloud Terraform template runs in your Google Cloud project. Review the template before deployment to understand the resources it creates.
When you run the template in Google Cloud Shell, it deploys the Agent. The Agent establishes a private connection to VeloDB Cloud and completes warehouse initialization.
Return to the VeloDB Cloud console and wait for warehouse initialization and initial cluster creation to finish.
Review the created resources
-
Compute Engine instance
- Name:
VeloDBAgent - Purpose: Runs the Agent, Prometheus, Fluent Bit, and related programs.
- Name:
-
Private Service Connect endpoint
- Name:
VeloDBEndpoint - Purpose: Establishes a private network connection to the VeloDB Cloud management service for control instructions and monitoring and log delivery.
- Name:
-
VPC firewall rules
- Template resources:
VeloDBSecurityGroupIngressSelf,VeloDBSecurityGroupIngress,VeloDBSecurityGroupEgress - Purpose: Allow TCP ports
1-65535between instances with the warehouse network tag and from Google Cloud health check ranges, allow subnet traffic to TCP ports8000-10000and443, and allow outbound TCP ports1-65535.
- Template resources:
-
Cloud Storage bucket
- Name:
VeloDBBucket - Purpose: Stores warehouse data.
- Name:
-
IAM service accounts, custom role, and HMAC keys
- Names:
VeloDBControlPlaneRole(control plane service account)VeloDBControlPlaneRolePolicy(custom role policy)VeloDBDataAccessRole(data-access service account)- Two Cloud Storage HMAC keys, one for each service account.
- Purpose: The Agent VM uses the control plane service account. Warehouse VMs use the data-access service account. The template also configures the Agent with the control plane account's HMAC credentials for storage access. HMAC keys are access credentials, not encryption keys.
- Names:
The names above identify resources in the Terraform template. Actual cloud resource names include generated suffixes.
Review service account permissions
The Agent VM uses the control plane service account. Warehouse VMs use the data-access service account. The existing and new VPC templates grant the same roles.
| Service account | Role | Scope | Purpose |
|---|---|---|---|
| Control plane | Custom Compute Engine role | Deployment project | Provision and manage warehouse VMs, disks, network access, and load balancers. The tables below list its permissions. |
| Control plane and data access | roles/storage.admin | IAM policy on the template-created bucket | Read, write, and delete warehouse data. Both accounts can also change the bucket's IAM policy, including who has access to the data. |
| Control plane and data access | roles/iam.serviceAccountUser | Deployment project | Grants iam.serviceAccounts.actAs on service accounts in the project. Attaching an account to a VM also requires Compute Engine permissions on the VM. Minting access tokens directly requires a separate IAM permission. |
Both Terraform templates attach the Storage Admin bindings to the warehouse bucket’s IAM policy. The condition checks that the resource name starts with the bucket’s full resource name, covering the bucket and its objects. The bucket-level bindings grant no access to other buckets.
The custom Compute Engine role applies throughout the project, including resources without warehouse labels. The tables list the template grants. The minimum permissions for an individual deployment have not been verified and depend on the configuration and operations used. For Google's permission reference, see Compute Engine IAM roles and permissions.
Create, resize, and retire warehouse nodes
The Agent uses its project-level Compute Engine role for the initial cluster, new clusters, and subsequent node operations.
| Warehouse operation | What the Agent does in Google Cloud |
|---|---|
| Place nodes in the selected network and zone | compute.regions.get, compute.zones.list, and compute.zones.get cover placement. compute.networks.list, compute.networks.get, compute.subnetworks.list, and compute.subnetworks.get cover network discovery. compute.networks.use and compute.subnetworks.use allow resources to use that network. |
| Create a cluster or scale out | compute.instances.create provisions the VMs. compute.disks.create and compute.disks.use cover new persistent disks. compute.instances.setMetadata and compute.instances.setTags cover startup configuration and network tags. compute.instances.get, compute.instances.list, and compute.zoneOperations.get let the Agent find nodes, check their state, and follow zonal operations. |
| Give a node access to warehouse data | The Agent uses iam.serviceAccounts.actAs on the data-access service account and compute.instances.setServiceAccount on the VM to attach the account. Creating a new VM also requires compute.instances.create. Workloads on the VM access the warehouse bucket through roles/storage.admin. |
| Change a node's machine type | The Agent stops the VM with compute.instances.stop, changes its machine type with compute.instances.setMachineType, and brings it back with compute.instances.start. |
| Expand a node's persistent disk | compute.disks.get and compute.disks.list cover disk lookups. compute.disks.resize increases capacity in place. |
| Suspend or resume a cluster, or reboot a node | VeloDB Cloud stops the VMs with compute.instances.stop when suspending the cluster and starts them with compute.instances.start when resuming it. compute.instances.reset forces the VM to restart without a graceful guest OS shutdown. |
| Identify warehouse resources | compute.instances.setLabels and compute.disks.setLabels apply warehouse and cluster labels to VMs and persistent disks. |
| Scale in, replace a node, or delete a cluster | compute.instanceGroups.update lets the Agent remove an endpoint-serving VM from its backend group. compute.instances.delete releases a retired VM. Disks marked for automatic deletion are released with it. The role also includes compute.disks.delete for removing a disk separately. A replacement uses the same launch permissions as scale-out. |
Route warehouse connections
| Warehouse operation | Permissions and when they apply |
|---|---|
| Reserve an endpoint address | For a public IP, the role includes compute.addresses.create and compute.addresses.use. For a private IP it also includes compute.addresses.createInternal and compute.addresses.useInternal. compute.addresses.get and compute.addresses.list locate the reservation. |
| Create a connection endpoint | compute.instanceGroups.create and compute.instanceGroups.use cover the backend group. compute.regionHealthChecks.create and compute.regionHealthChecks.useReadOnly cover its health check. compute.regionBackendServices.create and compute.regionBackendServices.use let the Agent create the regional backend service and reference it from a frontend created with compute.forwardingRules.create. |
| Add or remove endpoint backends | compute.instanceGroups.get, compute.instanceGroups.update, and compute.instances.use cover adding or removing serving VMs and configuring the group's named ports. If the set of backend groups changes, compute.regionBackendServices.get and compute.regionBackendServices.update cover updating the service. |
| Look up or change endpoint routing | compute.regionBackendServices.list, compute.forwardingRules.list, and compute.forwardingRules.get allow backend and frontend lookups. The role includes compute.forwardingRules.update for changes to supported rule properties. |
| Retire an endpoint | compute.forwardingRules.delete, compute.regionBackendServices.delete, compute.instanceGroups.delete, and compute.regionHealthChecks.delete cover removal of the traffic path. compute.addresses.delete and compute.addresses.deleteInternal cover releasing the reserved address according to its type. |
Review other actions in the control plane role
The template also grants access for the following tasks. In particular, Compute Engine's VM suspend and resume APIs preserve VM state and are separate from the cluster stop and start operations above.
Show permissions by task
| Task | Permissions included in the role |
|---|---|
| Suspend a VM with its memory preserved or resume it | compute.instances.suspend, compute.instances.resume. |
| Change VM properties or rename a VM | compute.instances.update, compute.instances.setName. |
| Change disk attachments or retention | compute.instances.attachDisk, compute.instances.detachDisk, compute.instances.setDiskAutoDelete. |
| Inspect or change firewall rules | compute.firewalls.list, compute.firewalls.get, and compute.instances.getEffectiveFirewalls cover rule lookups. compute.networks.updatePolicy, compute.firewalls.create, compute.firewalls.update, and compute.firewalls.delete cover changes to rules on the VPC. |
| Log in to a VM with OS Login enabled | compute.instances.osLogin grants standard login. compute.instances.osAdminLogin grants administrator login. |
| Label endpoint resources or inspect backend access | compute.addresses.setLabels and compute.forwardingRules.setLabels cover endpoint labels. compute.regionBackendServices.getIamPolicy reads the IAM policy attached to the regional backend service. |
| Manage Resource Manager tags on VMs and disks | compute.instances.createTagBinding, compute.instances.listTagBindings, compute.instances.deleteTagBinding, compute.disks.createTagBinding, compute.disks.deleteTagBinding. |
| Manage Resource Manager tags on firewall rules and backend services | compute.firewalls.createTagBinding, compute.firewalls.deleteTagBinding, compute.regionBackendServices.createTagBinding, compute.regionBackendServices.deleteTagBinding. |
Permissions reference
Control plane service account: Compute Engine permissions
# VM lifecycle and access
- compute.instances.create # Provision VMs when creating a warehouse or adding nodes.
- compute.instances.createTagBinding # Attach a Resource Manager tag to a VM for tag-based policies.
- compute.instances.delete # Remove a VM when retiring or replacing a node.
- compute.instances.deleteTagBinding # Remove a Resource Manager tag binding from a VM.
- compute.instances.get # Read one VM's configuration and power state.
- compute.instances.getEffectiveFirewalls # Inspect the firewall rules that apply to a VM's network interface.
- compute.instances.list # Find the VMs that match a warehouse's node names or labels.
- compute.instances.listTagBindings # Inspect Resource Manager tags bound to a VM.
- compute.instances.osAdminLogin # Log in with administrator privileges, including sudo, when OS Login is enabled.
- compute.instances.osLogin # Log in to a VM as a standard Linux user when OS Login is enabled.
- compute.instances.reset # Force a VM to restart without a graceful guest OS shutdown.
- compute.instances.resume # Restore a suspended VM to its saved state.
- compute.instances.setLabels # Record identifiers such as the warehouse or cluster on a VM.
- compute.instances.setMachineType # Change a stopped node's machine type when resizing compute capacity.
- compute.instances.setMetadata # Set instance metadata such as a startup script or monitoring configuration.
- compute.instances.setName # Rename a VM.
- compute.instances.setServiceAccount # Set a VM's service account. The caller also needs iam.serviceAccounts.actAs on that account.
- compute.instances.setTags # Set network tags that select which VPC firewall rules apply to a VM.
- compute.instances.start # Bring a stopped node back online.
- compute.instances.stop # Shut down a VM while retaining its persistent disks.
- compute.instances.suspend # Pause a VM and preserve its memory and device state.
- compute.instances.update # Change VM properties through the instance update API.
- compute.instances.use # Reference a VM as a member of a load balancer's instance group.
# Persistent disks
- compute.disks.create # Provision a persistent disk for a node.
- compute.disks.createTagBinding # Attach a Resource Manager tag to a disk for tag-based policies.
- compute.disks.delete # Release a persistent disk after its data is no longer needed.
- compute.disks.deleteTagBinding # Remove a Resource Manager tag binding from a disk.
- compute.disks.get # Read a disk's size, type, and attachment details.
- compute.disks.list # Locate persistent disks in the deployment.
- compute.disks.resize # Increase the capacity of a node's persistent disk.
- compute.disks.setLabels # Label a disk so it can be identified with its warehouse resources.
- compute.disks.use # Use a disk as a read-write volume when attaching it to a VM.
- compute.instances.attachDisk # Add a disk to a VM's storage configuration.
- compute.instances.detachDisk # Disconnect a disk from a VM so it can be retained or reused.
- compute.instances.setDiskAutoDelete # Choose whether deleting a VM also deletes an attached disk.
# Placement, VPC, and firewall rules
- compute.firewalls.create # Create traffic rules for warehouse nodes or load balancer health checks.
- compute.firewalls.createTagBinding # Attach a Resource Manager tag to the firewall rule itself.
- compute.firewalls.delete # Remove a firewall rule when its access is no longer needed.
- compute.firewalls.deleteTagBinding # Remove a Resource Manager tag binding from a firewall rule.
- compute.firewalls.get # Inspect one rule's direction, ports, and targets.
- compute.firewalls.list # Find the rules that govern warehouse traffic.
- compute.firewalls.update # Change a rule, for example to update allowed source addresses.
- compute.networks.get # Read the selected VPC's configuration.
- compute.networks.list # Find available VPC networks.
- compute.networks.updatePolicy # Authorize firewall rule changes on the VPC to which the rules apply.
- compute.networks.use # Reference the VPC when provisioning a networked resource.
- compute.regions.get # Read the selected region and its zones when placing resources.
- compute.subnetworks.get # Read a subnet's IP range and parent VPC.
- compute.subnetworks.list # Find subnets in the deployment region.
- compute.subnetworks.use # Place a VM interface or internal load balancer in the selected subnet.
- compute.zoneOperations.get # Check whether a zonal operation, such as creating a VM, has finished or failed.
- compute.zones.get # Check the selected zone's region and status.
- compute.zones.list # Discover zones available for warehouse nodes.
# Load balancer addresses and forwarding rules
- compute.addresses.create # Reserve a regional static IP address, for example for a public endpoint.
- compute.addresses.createInternal # Reserve an internal IP address for a private frontend.
- compute.addresses.delete # Release a regional address reservation when the endpoint is removed.
- compute.addresses.deleteInternal # Release an internal address reservation back to its subnet.
- compute.addresses.get # Read the IP and status of a particular reservation.
- compute.addresses.list # Locate reserved addresses when resolving a load balancer's frontend.
- compute.addresses.setLabels # Identify a reserved address with labels.
- compute.addresses.use # Assign a reserved address to a resource such as a forwarding rule.
- compute.addresses.useInternal # Use a reserved internal IP for a private endpoint.
- compute.forwardingRules.create # Create the rule that directs traffic from a frontend IP and port to a backend service.
- compute.forwardingRules.delete # Remove the forwarding rule when retiring a listener or load balancer.
- compute.forwardingRules.get # Inspect a rule's frontend address, ports, and backend.
- compute.forwardingRules.list # Find the forwarding rules associated with a load balancer.
- compute.forwardingRules.setLabels # Label a forwarding rule so it can be identified with its endpoint.
- compute.forwardingRules.update # Change supported properties of an existing forwarding rule.
# Load balancer backends and health checks
- compute.instanceGroups.create # Create a zonal group of VMs to receive load-balanced traffic.
- compute.instanceGroups.delete # Remove a backend group that is no longer in use.
- compute.instanceGroups.get # Read a backend group's configuration and named ports.
- compute.instanceGroups.update # Add or remove nodes and change the group's named ports.
- compute.instanceGroups.use # Attach an instance group to a backend service.
- compute.regionBackendServices.create # Create the regional service that distributes traffic to backend groups.
- compute.regionBackendServices.createTagBinding # Attach a Resource Manager tag to a backend service.
- compute.regionBackendServices.delete # Remove the backend service when deleting the load balancer.
- compute.regionBackendServices.deleteTagBinding # Remove a Resource Manager tag binding from a backend service.
- compute.regionBackendServices.get # Read the backend groups and health checks configured for a service.
- compute.regionBackendServices.getIamPolicy # Read the IAM policy attached directly to a regional backend service. Review higher-level policies separately for inherited access.
- compute.regionBackendServices.list # Find regional backend services when looking up load balancers.
- compute.regionBackendServices.update # Change a service's backend groups or health check configuration.
- compute.regionBackendServices.use # Reference the backend service from a forwarding rule.
- compute.regionHealthChecks.create # Create a regional health check, such as the TCP check on a warehouse backend's serving port.
- compute.regionHealthChecks.delete # Remove a health check when it is no longer in use.
- compute.regionHealthChecks.useReadOnly # Reference an existing regional health check from a backend service.
Predefined roles for both service accounts
# Bucket IAM policy
- roles/storage.admin # Read, write, and delete warehouse objects and change who has access through the bucket's IAM policy.
# Project IAM policy
- roles/iam.serviceAccountUser # Grants iam.serviceAccounts.actAs on project service accounts. Attaching one to a VM also requires Compute Engine permissions on the VM. Direct token creation requires a separate grant.
See also
- Create a BYOC Warehouse on Google Cloud: create a BYOC warehouse with a new or existing VPC.
- Supported Regions: select a supported Google Cloud region.