Skip to content

Commit f5c7f47

Browse files
authored
docs/direct.md: quote commands and add 'databricks' (#4079)
1 parent d41686f commit f5c7f47

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

docs/direct.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The new engine implements resources CRUD directly on top of SDK Go and provides
2222

2323
* Self-contained binary that does not require downloading Terraform and terraform-provider-databricks before deployment.
2424
* Avoid issues with firewalls/proxies/custom provider registries.
25-
* Explanation why a given action is planned and detailed diff of changes available in "bundle plan \-o json".
25+
* Explanation why a given action is planned and detailed diff of changes available in `databricks bundle plan -o json`.
2626
* Faster deployment.
2727
* Simplified development of new resources, implement CRUD directly in CLI repo, no need to coordinate with terraform provider release.
2828

@@ -38,15 +38,19 @@ The direct engine uses its own state file, also JSON, but with a different schem
3838

3939
The full sequence of operations:
4040

41-
1. Perform full deployment with Terraform: bundle deploy \-t my\_target
42-
2. Migrate state file locally: bundle deployment migrate \-t my\_target
43-
3. Verify that migration was successful: bundle plan should work and should not show any changes to be planned: bundle plan \-t my\_target
44-
4. If not satisfied with the result, remove new state file: rm .databricks/bundle/my\_target/resources.json
45-
5. If satisfied with the result, do a deployment to synchronize the state file to the workspace: bundle deploy \-t my\_target
41+
1. Perform full deployment with Terraform: `databricks bundle deploy -t my_target`
42+
2. Migrate state file locally: `databricks bundle deployment migrate -t my_target`
43+
3. Verify that migration was successful: bundle plan should work and should not show any changes to be planned: `databricks bundle plan -t my_target`
44+
4. If not satisfied with the result, remove new state file and restore terraform state file from the backup:
45+
```
46+
mv .databricks/bundle/my_target/terraform/tfstate.json.backup .databricks/bundle/my_target/terraform/tfstate.json
47+
rm .databricks/bundle/my_target/resources.json
48+
```
49+
5. If satisfied with the result, do a deployment to synchronize the state file to the workspace: `databricks bundle deploy -t my_target`
4650

4751
### Using on new bundles
4852

49-
For bundles that were never deployed, the migrate command will not work. Instead, deploy with an environment variable set: DATABRICKS\_BUNDLE\_ENGINE=direct bundle deploy \-t my\_target.
53+
For bundles that were never deployed, the migrate command will not work. Instead, deploy with an environment variable set: `DATABRICKS_BUNDLE_ENGINE=direct databricks bundle deploy -t my_target`.
5054

5155
## Differences from terraform
5256

0 commit comments

Comments
 (0)