GCP — Terraform
You'll deploy a Databricks workspace with BYOVPC on GCP using Terraform in ~20 min.
Prereqs: GCP project, Terraform CLI, Databricks account console
What you'll build
A Databricks workspace deployed into your GCP project with a customer-managed VPC. The Terraform template handles service accounts, GCS buckets, VPC networking, and workspace configuration.
Prerequisites
- A GCP project with Owner permissions.
- A Databricks account with account-admin privileges.
- Terraform CLI installed locally.
- GCP CLI authenticated (
gcloud auth application-default login).
Steps
1. Deploy the workspace
- Go to the template repository: GCP BYOVPC Terraform Deployment.
- Follow the README.md instructions.
- Copy
tf/terraform.tfvars.exampleand fill in your values — project ID, region, and workspace name. - Run
terraform init && terraform apply. - Repeat for staging and production workspaces.
Verify
- Log in to the Databricks account console.
- Navigate to Workspaces and confirm the new workspace shows a Running status.
- In the GCP console, verify the VPC and service accounts were created in the target project.
Troubleshoot
Terraform apply fails with API not enabled
The template requires several GCP APIs (Compute Engine, Cloud Storage, IAM). Enable them with gcloud services enable compute.googleapis.com storage.googleapis.com iam.googleapis.com on the target project.
Permission errors during apply
Verify gcloud auth application-default login is authenticated with a principal that has Owner access on the target project. Run gcloud config get-value project to confirm the active project.
Next
- Do next: Add Users
- Learn why: Unity Catalog foundations
- Reference: Databricks Terraform provider