Retrieves a list of databricks_job ids, that were created by Terraform or manually, so that special handling could be applied.
Granting view databricks_permissions to all databricks_job within the workspace:
data "databricks_jobs" "this" {}
resource "databricks_permissions" "everyone_can_view_all_jobs" {
for_each = data.databricks_jobs.this.ids
job_id = each.value
access_control {
group_name = "users"
permission_level = "CAN_VIEW"
}
}
Getting ID of specific databricks_job by name:
data "databricks_jobs" "this" {}
output "x" {
value = "ID of `x` job is ${data.databricks_jobs.this.ids["x"]}"
sensitive = false
}
This data source exports the following attributes:
ids
- map of databricks_job names to idsThe following resources are used in the same context: