cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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 II

@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!

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