cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Install notebook dependency via terraform for serverless notebook tasks

rgomez
New Contributor

I am trying to install a wheel file as a dependency for a serverless notebook task via terraform. According to https://docs.databricks.com/en/compute/serverless/dependencies.html , dependencies in serverless notebooks can be configured via the base environment or the notebook environment. I was taking look at the databricks_job resource in https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/job and found the environment configuration block. After taking a closer look at the API documentation  in  https://docs.databricks.com/api/workspace/jobs/create#environments it seems that the environment configuration block is only available for non-notebooks tasks. What would be the best way to configure the base or notebook environment via terraform for serverless notebook tasks? Thanks!

1 REPLY 1

Walter_C
Databricks Employee
Databricks Employee

Currently, the databricks_job resource in Terraform does not support configuring the environment for notebook tasks directly. You can upload the YAML file and configure the environment as mentioned in https://docs.databricks.com/en/compute/serverless/dependencies.html#configure-a-base-environment via API or CLI and then you will need to set the notebook via the UI

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group