11
2- === Terraform state is present, empty env var uses state engine
2+ === Terraform state present: the direct default migrates it to the direct engine
33
4- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle deploy
5- Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
6- Created schemas.foo
7- Files: 1 uploaded, 0 deleted
8- Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
4+ >>> replay_tfstate.py terraform-requests.json terraform.tfstate
95
10- >>> print_requests.py //api/2.1/unity-catalog/schemas
11- "databricks-tf-provider/[TF_PROVIDER_VERSION] databricks-sdk-go/[SDK_VERSION] go/1.25.8 os/[OS] cli/[CLI_VERSION] terraform/1.5.5 sdk/sdkv2 resource/schema auth/pat"
12-
13- >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle plan
6+ >>> [CLI] bundle plan
147Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
158Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
169
1710>>> print_requests.py --get //api/2.1/unity-catalog/schemas
11+ "replay_tfstate.py"
1812"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] interactive/none auth/pat"
1913"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_plan cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
2014
21- === Adding resources.json with lower serial does not change anything
22- >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
15+ === A resources.json with a lower serial does not win: the terraform state still migrates
16+ >>> [CLI] bundle plan
2317Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
2418Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
2519
26- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan
27- Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
28-
29- >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle plan
30- Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
31- Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
32-
33- === Adding resources.json with higher serial, env var mismatch warns but uses state engine
34-
35- >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle plan
36- create schemas.foo
37-
38- Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
20+ === A resources.json with a higher serial wins: the direct state is authoritative, no migration
3921
40- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle plan
41- create schemas.foo
22+ >>> [CLI] bundle plan
23+ create schemas.my_schema
4224
4325Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
4426
45- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle deploy
27+ >>> [CLI] bundle deploy
4628Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
47- Created schemas.foo
48- Files: 0 uploaded, 0 deleted
29+ Created schemas.my_schema
30+ Files: 1 uploaded, 0 deleted
4931Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
5032
5133>>> print_requests.py //api/2.1/unity-catalog/schemas
5234"cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_deploy cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
5335
54- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle destroy --auto-approve
36+ >>> [CLI] bundle destroy --auto-approve
5537The following resources will be deleted:
56- delete resources.schemas.foo
38+ delete resources.schemas.my_schema
5739
5840This action will result in the deletion of the following UC schemas. Any underlying data may be lost:
59- delete resources.schemas.foo
41+ delete resources.schemas.my_schema
6042
6143All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
6244
6345Destroy: 1 deleted
6446
65- >>> DATABRICKS_BUNDLE_ENGINE=direct [CLI] bundle deploy
47+ >>> [CLI] bundle deploy
6648Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
67- Created schemas.foo
49+ Created schemas.my_schema
6850Files: 1 uploaded, 0 deleted
6951Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
7052
@@ -74,26 +56,9 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
7456>>> print_state.py
75571
7658
77- >>> DATABRICKS_BUNDLE_ENGINE=terraform [CLI] bundle deploy
78- Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
79- Files: 0 uploaded, 0 deleted
80- Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
81-
82- >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle deploy
83- Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
84- Files: 0 uploaded, 0 deleted
85- Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
86-
87- >>> print_requests.py --get //api/2.1/unity-catalog/schemas
88- "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_deploy cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
89- "cli/[CLI_VERSION] databricks-sdk-go/[SDK_VERSION] go/[GO_VERSION] os/[OS] cmd/bundle_deploy cmd-exec-id/[UUID] interactive/none engine/direct auth/pat"
90-
91- >>> print_state.py
92- 1
93-
94- >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states
59+ >>> [CLI] bundle debug states
9560[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=1 lineage="[UUID]"
9661
97- >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle debug states --force-pull
62+ >>> [CLI] bundle debug states --force-pull
9863resources.json: remote direct state serial=1 lineage="[UUID]"
9964[TEST_TMP_DIR]/.databricks/bundle/default/resources.json: local direct state serial=1 lineage="[UUID]"
0 commit comments