Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 3.38 KB

File metadata and controls

57 lines (39 loc) · 3.38 KB
subcategory
Compute

databricks_clusters Data Source

-> 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.

Retrieves a list of databricks_cluster ids, that were created by Terraform or manually, with or without databricks_cluster_policy.

Example Usage

Retrieve cluster IDs for all clusters:

data "databricks_clusters" "all" {
}

Retrieve cluster IDs for all clusters having "Shared" in the cluster name:

data "databricks_clusters" "all_shared" {
  cluster_name_contains = "shared"
}

Argument Reference

filter_by Configuration Block

The filter_by block controls the filtering of the listed clusters. It supports the following arguments:

  • cluster_sources - (Optional) List of cluster sources to filter by. Possible values are API, JOB, MODELS, PIPELINE, PIPELINE_MAINTENANCE, SQL, and UI.
  • cluster_states - (Optional) List of cluster states to filter by. Possible values are RUNNING, PENDING, RESIZING, RESTARTING, TERMINATING, TERMINATED, ERROR, and UNKNOWN.
  • is_pinned - (Optional) Whether to filter by pinned clusters.
  • policy_id - (Optional) Filter by databricks_cluster_policy id.

Attribute Reference

This data source exports the following attributes:

Related Resources

The following resources are used in the same context: