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: 

My DABS CLI Deploy call not generating a .tfstate file

FabianGutierrez
Contributor

Hi Community,
I'm running into an issue, when executing Databricks CLI Bundle Deploy I dont get the Terraform State file (.tfstate). I know that I should get one but even when defining the state_apth on my YAML (.yml) DABS file I still do not get it.

Does anybody have a solution or suggestion? 

FabianGutierrez_0-1731932526298.png

Thanks in advanced.

Regards,

Fabian

 

9 REPLIES 9

szymon_dybczak
Contributor III

Hi @FabianGutierrez ,

Could you remove tilde (~) from your state_path? In linux tilde is a shortcut for a user's home directory. Try to specify path starting from a root (/).

Hi @szymon_dybczak , For Developmen mode its mandatory and for Production mode I did removed/replaced it but still no file.

FabianGutierrez
Contributor

If any updates on this would be really helpful.

Thanks.

Hi @FabianGutierrez ,

Sorry, I didn't notice your reply. What version of cli you're using? Try to upgrade to newest version if possible

FabianGutierrez
Contributor

Hi @szymon_dybczak , we did that also from the very beginning when troubleshooting. We are using v0.233.0. Also Terraform compiler (binary) 1.9.8 Windows AMD64 and Databricks Terraform provider 1.54.0 Windows AMD64.

There error is still present eventhough latest version for Win compatible.

Ok, so for testing purposes remove state_path mapping from yaml path. The default path  for state shoud be ${workspace.root}/state.
Also, you can run enable debug mode in databricks cli. Maybe we can find some useful information from execution:

Troubleshoot the Databricks CLI | Databricks on AWS

We tried it as well and we got the following insides with --debug and now with log file, thanks for the link.
We can not seem to find the "local Terraform state" but also the .tfstate does not get placed (uploaded) in the ${workspace.root}/state location.

Any thoughts?

FabianGutierrez_0-1732120012031.png

 

FabianGutierrez
Contributor

By the way, we are not using User workspace as the default to deploy our DAB, we are using /Shared/release/<bundle_name>/

FabianGutierrez
Contributor

Forgot to also share this print screen of the last section in the logs. Somehow the State file keeps getting ignored (not found) so how can the deployment still take place I wonder.

FabianGutierrez_1-1732123235782.png

 

 

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