databricks-cli/bundle/tests/variables
Andrew Nester 5f42791609
Added support for complex variables (#1467)
## Changes
Added support for complex variables

Now it's possible to add and use complex variables as shown below

```
bundle:
  name: complex-variables

resources:
  jobs:
    my_job:
      job_clusters:
        - job_cluster_key: key
          new_cluster: ${var.cluster}
      tasks:
      - task_key: test
        job_cluster_key: key

variables:
  cluster:
    description: "A cluster definition"
    type: complex
    default:
      spark_version: "13.2.x-scala2.11"
      node_type_id: "Standard_DS3_v2"
      num_workers: 2
      spark_conf:
        spark.speculation: true
        spark.databricks.delta.retentionDurationCheck.enabled: false
```

Fixes #1298

- [x] Support for complex variables
- [x] Allow variable overrides (with shortcut) in targets
- [x] Don't allow to provide complex variables via flag or env variable
- [x] Fail validation if complex value is used but not `type: complex`
provided
- [x] Support using variables inside complex variables 

## Tests
Added unit tests

---------

Co-authored-by: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com>
2024-06-26 10:25:32 +00:00
..
complex Added support for complex variables (#1467) 2024-06-26 10:25:32 +00:00
env_overrides Override variables with lookup value even if values has default value set (#1504) 2024-06-19 08:03:06 +00:00
vanilla First look for databricks.yml before falling back to bundle.yml (#580) 2023-07-18 12:16:34 +02:00
variable_overrides_in_target Fix variable overrides in targets for non-string variables (#1397) 2024-04-25 11:21:10 +00:00
without_definition Initialize variable definitions that are defined without properties (#966) 2023-11-08 11:01:14 +00:00