subcategory |
---|
Compute |
-> Note If you have a fully automated setup with workspaces created by databricks_mws_workspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.
Gets Databricks Runtime (DBR) version that could be used for spark_version
parameter in databricks_cluster and other resources that fits search criteria, like specific Spark or Scala version, ML or Genomics runtime, etc., similar to executing databricks clusters spark-versions
, and filters it to return the latest version that matches criteria. Often used along databricks_node_type data source.
-> Note This is experimental functionality, which aims to simplify things. In case of wrong parameters given (e.g. together ml = true
and genomics = true
, or something like), data source will throw an error. Similarly, if search returns multiple results, and latest = false
, data source will throw an error.
data "databricks_node_type" "with_gpu" {
local_disk = true
min_cores = 16
gb_per_core = 1
min_gpus = 1
}
data "databricks_spark_version" "gpu_ml" {
gpu = true
ml = true
}
resource "databricks_cluster" "research" {
cluster_name = "Research Cluster"
spark_version = data.databricks_spark_version.gpu_ml.id
node_type_id = data.databricks_node_type.with_gpu.id
autotermination_minutes = 20
autoscale {
min_workers = 1
max_workers = 50
}
}
Data source allows you to pick groups by the following attributes:
latest
- (boolean, optional) if we should return only the latest version if there is more than one result. Default totrue
. If set tofalse
and multiple versions are matching, throws an error.long_term_support
- (boolean, optional) if we should limit the search only to LTS (long term support) & ESR (extended support) versions. Default tofalse
.ml
- (boolean, optional) if we should limit the search only to ML runtimes. Default tofalse
.genomics
- (boolean, optional) if we should limit the search only to Genomics (HLS) runtimes. Default tofalse
.gpu
- (boolean, optional) if we should limit the search only to runtimes that support GPUs. Default tofalse
.photon
- (boolean, optional) if we should limit the search only to Photon runtimes. Default tofalse
.graviton
- (boolean, optional) if we should limit the search only to runtimes supporting AWS Graviton CPUs. Default tofalse
.beta
- (boolean, optional) if we should limit the search only to runtimes that are in Beta stage. Default tofalse
.scala
- (string, optional) if we should limit the search only to runtimes that are based on specific Scala version. Default to2.12
.spark_version
- (string, optional) if we should limit the search only to runtimes that are based on specific Spark version. Default to empty string. It could be specified as3
, or3.0
, or full version, like,3.0.1
.
Data source exposes the following attributes:
id
- Databricks Runtime version, that can be used asspark_version
field in databricks_job, databricks_cluster, or databricks_instance_pool.
The following resources are used in the same context:
- End to end workspace management guide.
- databricks_cluster to create Databricks Clusters.
- databricks_cluster_policy to create a databricks_cluster policy, which limits the ability to create clusters based on a set of rules.
- databricks_instance_pool to manage instance pools to reduce cluster start and auto-scaling times by maintaining a set of idle, ready-to-use instances.
- databricks_job to manage Databricks Jobs to run non-interactive code in a databricks_cluster.