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!