Steps to repro:
- run a deploy
- wait for successful deploy
- delete .databricks directory (in jenkins or ci/cd tools if that is not checked in it wont exist)
- run bundles desotry
You will run into error:
Error: failed to read schema for databricks_pipeline.sri_test_hello_world in registry.terraform.io/databricks/databricks: failed to instantiate provider "registry.terraform.io/databricks/databricks" to obtain schema: unavailable provider "registry.terraform.io/databricks/databricks"
The cause is there is no bundles.tf.json which contains the required providers block which is needed.
Possible solutions:
- run
terraform.write() in the destroy phase (Will make PR with this as its a 1 liner)
- alternative have
terraform.writeProviders() to just generate empty providers.