How it works
Your client connects to a local port. bqto carries the traffic through Identity-Aware Proxy (IAP) and a temporary bastion VM to the private address of the service.- bqto asks the API of the service for its private address.
- bqto checks that the firewall lets IAP reach port 22. Then it creates a small bastion VM in the network of the service, with no external IP.
- bqto opens an IAP tunnel and forwards a local port through the bastion to the service.
- When you stop, bqto deletes the bastion. If bqto cannot delete it, a deadline set on the VM deletes it.
gcloud login and your Application Default Credentials. Your IAM
roles decide what you can reach.
Limits
bqto is for interactive use, such aspsql or a local client on a forwarded port, and for
transfers of a few gigabytes. It is not for bulk data. Google says that IAP TCP forwarding is not
intended for bulk transfer of data. A dump or restore of tens of gigabytes belongs on a VM in the
VPC, with the data moved through Cloud Storage.
These numbers were measured in us-central1, against Cloud SQL for PostgreSQL 17:
Each query pays the round trip through IAP and the bastion. So thousands of queries in a row are
slow. Batch them, or run the job inside Google Cloud.
IAP closes a tunnel after an hour with no traffic. bqto sends an SSH keepalive every 30 seconds,
so a quiet session stays open.
bqto and bqto Pro
bqto is free and open source, under the Apache License 2.0. bqto Pro is the paid edition. It is onebqto binary that does everything the free bqto does, and adds more services and features.
The free bqto marks the bqto Pro flags
(bqto Pro) in its help. If you give it one of them, it
stops before it creates anything and exits with code 2.
Next steps
Install bqto
Install the free bqto or bqto Pro.
First connection
Sign in, get the roles, and connect to a private database.
Permissions
The IAM roles and APIs that bqto needs.
GitHub Actions
Run a step against a private service from a workflow.