1

I have few clusters created and I want to install the libraries on them. The catch though is I want these libraries to be installed automatically whenever I create another cluster. Is there a way to do this?

What I am currently doing is this -> https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/library

Alex Ott
  • 80,552
  • 8
  • 87
  • 132

1 Answers1

0

You should to combine combine the databricks_clusters data source (doc) with the library resource, something like this (example right from the library resource docs):

data "databricks_clusters" "all" {
}

resource "databricks_library" "cli" {
  for_each   = data.databricks_clusters.all.ids
  cluster_id = each.key
  pypi {
    package = "databricks-cli"
  }
}
Alex Ott
  • 80,552
  • 8
  • 87
  • 132