Skip to content

Unsupported "valueFrom" when configuring app config using bundle #4288

@wallrothm

Description

@wallrothm

Describe the issue

The possibility to use bundle variables when configuring the app was recently added in #4271

The implementation seems to be incomplete though, as there's currently no way to use valueFrom in this spec. Nor is it possible to combine app.yaml and the bundle app config (unless I'm missing something).

In practice, this means it's not possible to combine valueFrom with bundle variables.

Configuration

bundle:
  name: test

variables:
  catalog:
    description: The catalog to use
    default: dev_catalog
  warehouse_id:
    description: The SQL warehouse ID to use
    default: "1234-567890-abcd123"

targets:
  dev:
    mode: development
    default: true
    resources:
      apps:
        my-app:
          name: my-app
          source_code_path: "."
          config:
            env:
              - name: catalog
                value: ${var.catalog}
              - name: warehouse_id
                valueFrom: sql-warehouse
          resources:
            - name: sql-warehouse
              description: "A SQL warehouse for app to be able to work with"
              sql_warehouse:
                id: ${var.warehouse_id}
                permission: "CAN_USE"

Steps to reproduce the behavior

databricks bundle validate

Expected Behavior

The bundle validation to succeed (and deployment to work).

Actual Behavior

> databricks bundle validate
Warning: unknown field: valueFrom
  at targets.dev.resources.apps.my-app.config.env[1]
  in databricks.yml:26:17

Warning: required field "value" is not set
  at resources.apps.my-app.config.env[1]
  in databricks.yml:25:17

OS and CLI version

Windows 11
Databricks CLI v0.283.0

Is this a regression?

No, the functionality is new.

Debug Logs

Output logs if you run the command with debug logs enabled. Example: databricks bundle deploy --log-level=debug. Redact if needed

Metadata

Metadata

Assignees

Labels

DABsDABs related issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions