databricks_jobs Data Source

Retrieves a list of databricks_job ids, that were created by Terraform or manually, so that special handling could be applied.

Example Usage

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
}

Attribute Reference

This data source exports the following attributes:

The following resources are used in the same context: