BYOC on GCP is in beta. Inputs and behavior can change between releases.
Before you start
You need the following:- BYOC enabled on your organization: Create an organization in LangSmith at smith.langchain.com, or reuse an existing one, and send its organization ID to the LangChain team to enable BYOC.
- An organization admin: Creating a data plane requires the organization admin role, and an API key for that user.
- A GCP project for the data planes: Use a project that holds only LangSmith resources. Most of the provisioner’s permissions apply only to resources whose names start with
langsmith-, but some cover the whole project. If the project also holds other resources, setbyo_iam = truein Step 2. The project must not already have amanaged_bytag key, and must hold only one copy of the Terraform module. For details, see What LangChain can and cannot access. - Permissions in that project: Permission to create service accounts, grant project IAM roles, enable APIs, and create tags. The tags need Tag Administrator (
roles/resourcemanager.tagAdmin) on the project. - Terraform: Terraform 1.11.0 or later, with Google provider 6.0 or later, before 9.0.
- A GCP region: BYOC on GCP can run in any GCP region. If the region you need is not enabled yet, contact the LangChain team to add it.
- Resource location policies: If your GCP organization restricts resource locations, allow the data plane region and
us-central1. The data plane creates its Private Service Connect endpoint to LangSmith inus-central1.
Set up a data plane
Step 1. Get the external ID
Navigate to Settings > Data Planes in LangSmith and use the copy button next to the Data Planes header to copy the external ID. Do not make up your own value.Step 2. Run the Terraform module
Apply thelangsmith-byoc-service-account Terraform module in your project. The module:
- Enables the APIs that data planes use. Set
enable_apis = falseif you manage the project’s APIs elsewhere. - Creates the provisioner service account
langsmith-byoc-provisioner, with its description set to your external ID. - Grants it custom roles with only the permissions that provisioning and teardown use. Most of them apply only to resources whose names start with
langsmith-. - Creates the tag
managed_by: langsmithin the project, and grants the LangSmith control plane service accountroles/container.adminonly on GKE clusters with that tag. LangSmith tags the data plane GKE clusters and Cloud SQL instances it creates, and the Postgres setup account’s Cloud SQL permissions apply only to tagged instances. - Lets the LangSmith control plane service account,
byoc-crossplane@langchain-prod.iam.gserviceaccount.com, impersonate it through the Service Account Token Creator role. The module trusts no other LangSmith identity.
byo_iam = true before you create data planes in the project. The provisioner then cannot create service accounts or change the project IAM policy. Set it if the project holds resources that are not LangSmith’s. Create the data plane with byoiam_enabled set to true. For more information, see Bring your own IAM.
Step 3. Create the data plane
LangSmith automatically adds your project to the Private Service Connect accept list during provisioning. You do not need to send your project number to LangChain or wait for manual approval before creating the data plane. Create the data plane with the LangSmith API, using an organization admin’s API key:
The API returns
202 with the data plane’s id, api_url, and status. Before it accepts the request, LangSmith checks that it can impersonate the provisioner, and that the provisioner is in the project and carries your external ID. If a check fails, the response names the problem. See Troubleshoot create errors.
Step 4. Wait until active
LangSmith provisions the infrastructure in your project. The data plane status moves fromrequested to provisioning to active. Track it in Settings > Data Planes, or with GET /orgs/current/data-planes/<id>.
Provisioning can take up to 3 hours. After 3 hours, the status changes to
provisioning_failed. If that happens, contact the LangChain team.dp-<data_plane_name> is available in it, and you can create more workspaces. See the Create workspaces step in BYOC onboarding.
Use your data plane
Find the data plane URL
The data plane URL is theapi_url of the data plane: https://<first 8 characters of the data plane ID>.gcp.langchain-byoc.com. You can also find it in Settings > Data Planes.
To point applications and API clients at the data plane, see BYOC usage.
Choose a public or internal endpoint
You pick the endpoint type when you create the data plane:- Public: Users reach the data plane from the internet.
- Internal (default): The ingress is on an internal load balancer, and the hostname resolves only inside the data plane VPC. Connect your network to that VPC, for example with VPC peering or Cloud VPN, and make the hostname resolve from your network. See Connect your network.
Change data plane settings
On GCP, you can change the maintenance window. Blob TTL, Fleet OIDC, and network firewall settings are not available. The maintenance window is two hours in UTC, on whole hours, for examplesun:07:00-sun:09:00. It applies to Cloud SQL and Memorystore, whose windows last one hour, so LangSmith uses only the start. When it is unset, Google picks the window.
REGULAR release channel.
Troubleshoot create errors
The create request returns these error codes:
A request that fails field validation, such as a region that is not enabled, a
/18 vpc_cidr that overlaps the GKE pod range, or an mtu_bytes out of range, returns 400 with the field and the reason.
Delete a data plane
To delete a data plane:- Delete the data plane with
DELETE /orgs/current/data-planes/<id>. You can delete it while it isactive,provisioning, orprovisioning_failed. LangSmith deletes the resources it created in the project, except the data: the Cloud Storage bucket stays with its objects, and the Cloud SQL backups outlive the instance. See What teardown keeps. - Wait until the data plane is gone from Settings > Data Planes.
- If no other data planes use the project, run
terraform destroy.
What teardown keeps
Teardown keeps the data plane’s data in your project:- Cloud Storage bucket: The bucket and its objects stay. Its labels include the data plane ID.
- Final Cloud SQL backup: Cloud SQL takes a final backup when it deletes the instance, and keeps it for 365 days.
- Automated Cloud SQL backups: The instance’s automated backups stay, and expire one a day.
terraform destroy. Delete them yourself when you no longer need them.
Get help
When something does not work, contact LangChain support with:- Your organization ID and data plane name.
- What you did, and what happened.
- Error messages, screenshots, and timestamps.
- For provisioning problems: your GCP project ID, project number, and region.
See also
Connect these docs to your agent of choice via MCP for real-time answers.

