Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specific targets by resource #1887

Open
fernanluyano opened this issue Nov 6, 2024 · 1 comment
Open

Add specific targets by resource #1887

fernanluyano opened this issue Nov 6, 2024 · 1 comment
Assignees
Labels
DABs DABs related issues Question Further information is requested Response Requested

Comments

@fernanluyano
Copy link

fernanluyano commented Nov 6, 2024

Describe the issue

This is an improvement request to conditionally deploy to a target if present. For example, I have a bundle with dashboards, but one of the dashboards should only be deployed to the "prod" target/environment. How can I conditionally do that?

Setup of databricks.yml

...

targets:
  dev:
    default: true
    workspace:
      host: https://someDevUrl
    variables:
      warehouse_id: "uuid1"
  test:
    workspace:
      host: https://SomeTestUrl
    variables:
      warehouse_id: "uuid2"
  prod:
    workspace:
      host: https://SomeProdUrl
    variables:
      warehouse_id: "uuid3"

Setup of dashboards.yml

resources:
  dashboards:
    my_dash_1:
      display_name: "Only Prod Dashboard"
      warehouse_id: ${var.warehouse_id}
      file_path: file1.lvdash.json
      embed_credentials: false
   my_dash_2:
      display_name: "Any Target Dashboard"
      warehouse_id: ${var.warehouse_id}
      file_path: file2.lvdash.json
      embed_credentials: false

Desired behavior. Be able to overwrite which target a given resource can be deployed to, without having to create a new bundle just for 1 resource. I think it's reasonable to assume some resources can only be in a single environment/target

Edit. Apologies, I can't find where to tag this properly for enhancement or DABs

@fernanluyano fernanluyano added the CLI CLI related issues label Nov 6, 2024
@andrewnester andrewnester added DABs DABs related issues and removed CLI CLI related issues labels Nov 7, 2024
@andrewnester andrewnester self-assigned this Nov 12, 2024
@andrewnester
Copy link
Contributor

If you move the resource under the target it will only be deployed for this target

targets:
  dev:
  resources:
    dashboards:
      my_dash_1:
        display_name: "Only Prod Dashboard"
        warehouse_id: ${var.warehouse_id}
        file_path: file1.lvdash.json
        embed_credentials: false

@andrewnester andrewnester added Question Further information is requested Response Requested labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DABs DABs related issues Question Further information is requested Response Requested
Projects
None yet
Development

No branches or pull requests

2 participants