Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.79 KB

File metadata and controls

51 lines (34 loc) · 1.79 KB
subcategory
Compute

databricks_jobs 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_job ids, that were created by Terraform or manually, so that special handling could be applied.

-> Note Data resource will error in case of jobs with duplicate names.

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:

Related Resources

The following resources are used in the same context: