cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks Asset Bundles - terraform.tfstate not matching when using databricks bundle deploy

HelloME
New Contributor

Hello 🙂

I have notice something strange with the asset bundle deployments via the CLI tool

I am trying to run databricks bundle deploy and i'm getting and error saying the job ID doesn't exist or I don't have access to it. 

Error: cannot read job: User hello.me does not have Admin or Manage Run or Owner or View permissions on job 542299086197667

However, this job doesn't exist and when I go to the .bundle folder in my workspace, I can see all of my asset bundle code is there (my most recent), but the terraform.tfstate is referencing a job that doesn't exist, or an old asset bundle. 

I've deleted (and trashed) my .bundle folder in my workspace, and rerun databricks bundle deploy and still getting the same error.

And it still has terraform state referencing config files that have long been deleted (and jobs/pipelines).

Looking at my local I see the terraform.tfstate is updated and referencing the right files 

Is anyone able to help with this?

Databricks CLI v0.223.2

Thank you in advance

 

3 REPLIES 3

dbr_data_engg
New Contributor III

@Retired_mod ,

I am also facing same error, upgrading Databricks CLI doesn't work.

joho
New Contributor II

hello,
I experienced the same problem today. However i was able to fix it by deleting the tf statefile containing the deleted job. (Located in the .bundle folder in my workspace under the user/ service principal who deployed the bundle. )

azeddine_boua
New Contributor II

This solution works and solves the issue, thank you!

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now