DATABRICKS ASSET BUNDALS VS TERRAFORM

Janice Chi 580 Reputation points
2025-08-06T07:13:50.8033333+00:00

We are moving towards a multi-environment deployment model for our Databricks notebooks and jobs (Dev, QA, PreProd, Prod). Currently, infrastructure is provisioned via Terraform, and the DE team manually deploys notebooks or uses CLI scripts. We are considering migrating to Databricks Asset Bundles (DAB) for more modular and CI/CD-friendly deployments. Can Microsoft confirm if DAB is the recommended approach for managing multi-environment logic deployments in Databricks? Are there any known limitations, unsupported use cases, or best practices Microsoft advises for healthcare-grade ingestion pipelines using DAB? how it works with DBR repos

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 28,225 Reputation points Microsoft External Staff Moderator
    2025-08-06T08:51:04.1866667+00:00

    Hi @Janice Chi
    Thanks for outling your scenario. Given your move toward a multi-environment CI/CD model for healthcare-grade pipelines, it's great to see you're evaluating Databricks Asset Bundles (DAB) alongside your existing Terraform-based infrastructure.

    Is DAB the recommended approach for multi-environment Databricks deployments?

    Yes – Databricks Asset Bundles (DAB) are now the recommended and supported approach by Databricks for modular, code-driven deployments of notebooks, jobs, workflows, and environment-specific configurations.

    They integrate well with Azure DevOps, GitHub Actions, and other CI/CD tools, making them suitable for structured promotion across Dev → QA → PreProd → Prod.

    How does DAB compare with Terraform?

    Area Databricks Asset Bundles (DAB) Terraform for Databricks
    Primary Purpose Application deployment (jobs, workflows, code) Infrastructure provisioning (clusters, ACLs, etc.)
    CI/CD Integration Built-in support (e.g., bundle deploy, bundle run) Requires external scripting
    Environment Overrides Native support via targets: in bundle.yml Requires variable files and conditional logic
    Secrets/Mounts Not supported (must be handled separately) Can provision secrets, scopes, mounts
    Unity Catalog Support Fully supported in latest DAB versions Supported
    Versioning Git-based, declarative (via repo + DAB CLI) Declarative (via .tf files)
    Deployment to Repos Supports linking to DBR Repos as source Terraform supports repos via API or init scripts

    DAB and Terraform are complementary - not competing. Most customers use:

    • Terraform to provision infrastructure
    • DAB to deploy jobs, notebooks, workflows, and environment-specific configurations

    How does DAB work with DBR Repos?

    • DAB can deploy to Databricks Repos directly, allowing developers to version notebooks in Git and sync them with the workspace.
    • You can also define repos as dependencies or sources in bundle.yml.
    • Supports workflows that run code from repos, not just workspace paths.

    Healthcare Considerations & Best Practices

    Given the regulatory and audit requirements:

    • Keep secrets (e.g., connection strings, SHIR names) outside the bundle, injected at deploy/runtime via:
      • Azure Key Vault integration
      • Pipeline environment variables
      Tag bundles and deployments with run_id, env, git_commit for audit traceability.
    • Use target overrides in bundle.yml to:
      • Point to different SQL endpoints
      • Change notebook parameters
      • Control retry logic per environment
      Validate integrity post-deploy using SHA2 checks or reconciliation procedures (which you already use)

    Known DAB Limitations

    Doesn’t manage:

    • Secrets (must use Terraform or CLI)
    • Mount points
    • Unity Catalog permissions (use Terraform or REST APIs)

    No direct support for Delta Live Tables (DLT) yet

    Testing for large bundles (>100 jobs) may need careful orchestration

    Useful Docs:


    Hope this helps. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.