Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to install library on all clusters within workspace #954

Closed
nfx opened this issue Dec 11, 2021 · 0 comments · Fixed by #955 or #971
Closed

Ability to install library on all clusters within workspace #954

nfx opened this issue Dec 11, 2021 · 0 comments · Fixed by #955 or #971
Labels
feature New feature or request
Milestone

Comments

@nfx
Copy link
Contributor

nfx commented Dec 11, 2021

There are cases, when a certain set of libraries has to be installed on all of the clusters. One of the ways of doing it is through databricks_global_init_scirpt, though this is more of a workaround. Terraform-friendly solution is to create a data source to return a list of clusters and databricks_cluster_library resource (#904).

data "databricks_clusters" "all" {
}

resource "databricks_library" "cli" {
  for_each = data.databricks_clusters.all.ids
  cluster_id = each.key
  pypi {
    package = "databricks-cli"
  }
}
@nfx nfx added this to the v0.4.1 milestone Dec 11, 2021
@nfx nfx added the feature New feature or request label Dec 11, 2021
@nfx nfx linked a pull request Dec 11, 2021 that will close this issue
nfx added a commit that referenced this issue Dec 15, 2021
```hcl
data "databricks_clusters" "all" {
}

resource "databricks_library" "cli" {
  for_each = data.databricks_clusters.all.ids
  cluster_id = each.key
  pypi {
    package = "databricks-cli"
  }
}
```

Fix #904 #954
@nfx nfx linked a pull request Dec 15, 2021 that will close this issue
nfx added a commit that referenced this issue Dec 15, 2021
```hcl
data "databricks_clusters" "all" {
}

resource "databricks_library" "cli" {
  for_each = data.databricks_clusters.all.ids
  cluster_id = each.key
  pypi {
    package = "databricks-cli"
  }
}
```

Fix #904 #954
@nfx nfx closed this as completed in #971 Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
1 participant