mirror of https://github.com/databricks/cli.git
5fb40f9d07
## Changes Now we can define variables with values which reference different Databricks resources by name. When references like this, DABs automatically looks up the resource by this name and replaces the reference with ID of the resource referenced. Thus when the variable is used in the configuration it will contain the correct resolved ID of resource. The resolvers are code generated and thus DABs support referencing all resources which has `GetByName`-like methods in Go SDK. ### Example ``` variables: my_cluster_id: description: An existing cluster. lookup: cluster: "12.2 shared" resources: jobs: my_job: name: "My Job" tasks: - task_key: TestTask existing_cluster_id: ${var.my_cluster_id} targets: dev: variables: my_cluster_id: lookup: cluster: "dev-cluster" ``` ## Tests Added unit test + manual testing --------- Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> |
||
---|---|---|
.. | ||
artifacts | ||
config | ||
deploy | ||
deployer | ||
env | ||
internal | ||
libraries | ||
metadata | ||
permissions | ||
phases | ||
python | ||
run | ||
schema | ||
scripts | ||
tests | ||
bundle.go | ||
bundle_test.go | ||
context.go | ||
context_test.go | ||
deferred.go | ||
deferred_test.go | ||
log_string.go | ||
mutator.go | ||
mutator_test.go | ||
root.go | ||
root_test.go | ||
seq.go | ||
seq_test.go |