databricks-cli/.codegen
Andrew Nester 5fb40f9d07
Allow referencing bundle resources by name (#872)
## 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>
2024-01-04 21:04:42 +00:00
..
_openapi_sha Upgrade Go SDK to 0.27.0 (#1064) 2023-12-14 08:15:00 +00:00
changelog.md.tmpl Update CHANGELOG template (#588) 2023-07-27 10:47:38 +00:00
cmds-account.go.tmpl Remove dependency on global state in generated commands (#595) 2023-07-25 20:19:07 +02:00
cmds-workspace.go.tmpl Update Go SDK to v0.19.0 (#729) 2023-09-05 09:43:57 +00:00
lookup.go.tmpl Allow referencing bundle resources by name (#872) 2024-01-04 21:04:42 +00:00
service.go.tmpl Add list of supported values for flags that represent an enum field (#1036) 2023-12-06 08:12:17 +00:00