databricks_model_serving Resource

This resource allows you to manage Model Serving endpoints in Databricks.

Note If you replace served_models with served_entities in an existing serving endpoint, the serving endpoint will briefly go into an update state (~30 seconds) and increment the config version.

Example Usage

resource "databricks_model_serving" "this" {
  name = "ads-serving-endpoint"
  config {
    served_entities {
      name                  = "prod_model"
      entity_name           = "ads-model"
      entity_version        = "2"
      workload_size         = "Small"
      scale_to_zero_enabled = true
    }
    served_entities {
      name                  = "candidate_model"
      entity_name           = "ads-model"
      entity_version        = "4"
      workload_size         = "Small"
      scale_to_zero_enabled = false
    }
    traffic_config {
      routes {
        served_model_name  = "prod_model"
        traffic_percentage = 90
      }
      routes {
        served_model_name  = "candidate_model"
        traffic_percentage = 10
      }
    }
  }
}

Argument Reference

The following arguments are supported:

served_entities Configuration Block

served_models Configuration Block (deprecated)

traffic_config Configuration Block

auto_capture_config Configuration Block

tags Configuration Block

rate_limits Configuration Block

Attribute Reference

In addition to all arguments above, the following attributes are exported:

Access Control

Timeouts

The timeouts block allows you to specify create and update timeouts. The default right now is 45 minutes for both operations.

timeouts {
  create = "30m"
}

Import

The model serving resource can be imported using the name of the endpoint.

terraform import databricks_model_serving.this <model-serving-endpoint-name>

The following resources are often used in the same context: