Skip to content

Added an example how to deploy resources only for specific targets#96

Merged
andrewnester merged 7 commits intomainfrom
target-includes
Sep 16, 2025
Merged

Added an example how to deploy resources only for specific targets#96
andrewnester merged 7 commits intomainfrom
target-includes

Conversation

@andrewnester
Copy link
Copy Markdown
Contributor

@andrewnester andrewnester commented Aug 6, 2025

Added an example of how to deploy resources only for specific targets

This example illustrates how to achieve the same configuration often requested by using conditional includes/target includes or variables in the include section.

See databricks/cli#2878 databricks/cli#2872 databricks/cli#2903 as examples of such use cases.

There are some key aspects in this implementation

  1. In databricks.yml file we include (see include section) all configuration files for all targets. This does not impact which resources will be deployed for which target.
  2. For each job in the corresponding configuration file, like resources/set1/job_1.yml, we define in which targets this job should be deployed. We use YAML anchors to avoid duplication between targets.

Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

@juliacrawf-db Can you also take a look?

@andrewnester andrewnester requested a review from pietern August 6, 2025 13:33
andrewnester and others added 4 commits August 7, 2025 16:51
Co-authored-by: Julia Crawford (Databricks) <julia.crawford@databricks.com>
Co-authored-by: Julia Crawford (Databricks) <julia.crawford@databricks.com>
Co-authored-by: Julia Crawford (Databricks) <julia.crawford@databricks.com>
@andrewnester andrewnester merged commit 733ed00 into main Sep 16, 2025
1 check passed
@andrewnester andrewnester deleted the target-includes branch September 16, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants