subcategory |
---|
Compute |
Retrieves the settings of databricks_job by name or by id. Complements the feature of the databricks_jobs data source.
-> This data source can only be used with a workspace-level provider!
Getting the existing cluster id of specific databricks_job by name or by id:
data "databricks_job" "this" {
job_name = "My job"
}
output "job_num_workers" {
value = data.databricks_job.this.job_settings[0].settings[0].new_cluster[0].num_workers
sensitive = false
}
This data source exports the following attributes:
id
- the id of databricks_job if the resource was matched by name.name
- the job name of databricks_job if the resource was matched by id.job_settings
- the same fields as in databricks_job.
The following resources are used in the same context:
- databricks_jobs data to get all jobs and their names from a workspace.
- databricks_job to manage Databricks Jobs to run non-interactive code in a databricks_cluster.