- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 12:26 AM
Hi All
I'm trying to create a Databricks SQL Endpoint using Terraform with the following resource configuration:
resource "databricks_sql_endpoint" "dataproduct_sql_endpoint" {
provider = databricks.workspace
name = local.sql_name
cluster_size = var.cluster_size
max_num_clusters = var.max_num_clusters
min_num_clusters = var.min_num_clusters
auto_stop_mins = var.auto_stop_mins
enable_serverless_compute = true
}I'm using a service principal that has the necessary permissions. Interestingly, I can successfully create the same SQL endpoint using the Databricks REST API, authenticated with the same service principal.
However, when attempting to create the endpoint via Terraform, I receive the following error:
Error: cannot create sql endpoint: failed waiting for warehouse to start: timed out: Clusters are failing to launch. Cluster launch will be retried.
I upgraded the Databricks provider version, but it's still not working
Does anyone know what might be causing the difference in behavior between the Terraform provider and direct API usage?
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 03:53 AM
Hi @Olfa_Kamli ,
Terraform is usually stricter with how long it waits for resources to be ready, so it can time out faster than the REST API. You could try increasing the creation timeout in your Terraform config, as this might help give the warehouse enough time to start properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 08:57 AM
Thank you for the quick response. However, even after adding the timeout attribute, the issue persists
----------------------------
Request to create a cluster failed with an exception: INTERNAL_ERROR: Unexpected error occurred when trying to create cluster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2025 11:24 AM
@SP_6721just a quick heads-up, this is all sorted now. Turns out the compute (warehouse) was just missing a tag. Added it, and everything started working as expected! Thank u !!