You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command migrate existing terraform state file to direct deployment engine state. However, no existing local or remote state found.
3
+
This command migrates existing terraform state file (terraform.tfstate) to direct deployment engine state file (resources.json). However, no existing local or remote state found.
4
4
5
5
To start using direct engine, deploy with DATABRICKS_BUNDLE_ENGINE=direct env var or bundle.engine="direct" in databricks.yml.
6
6
@@ -10,78 +10,40 @@ Deploying resources...
10
10
Updating deployment state...
11
11
Deployment complete!
12
12
13
-
>>> head -n 5 .databricks/bundle/default/terraform/terraform.tfstate
14
-
{
15
-
"version": 4,
16
-
"terraform_version": "1.5.5",
17
-
"serial": 3,
18
-
"lineage": "[UUID]",
19
-
20
13
>>> [CLI] bundle deployment migrate
21
-
Migrated 2 resources to direct engine state file: [TEST_TMP_DIR]/.databricks/bundle/default/resources.json
14
+
Migrated 3 resources to direct engine state file: [TEST_TMP_DIR]/.databricks/bundle/default/resources.json
15
+
To finalize deployment, run "bundle deploy".
16
+
17
+
>>> ls -1 .databricks/bundle/default/
22
18
deployment.json
23
19
resources.json
24
20
sync-snapshots
25
21
terraform
26
22
27
-
>>> cat .databricks/bundle/default/resources.json
23
+
>>> [CLI] bundle plan
24
+
update pipelines.test_pipeline
25
+
26
+
Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged
Copy file name to clipboardExpand all lines: cmd/bundle/deployment/migrate.go
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ import (
10
10
"github.com/databricks/cli/cmd/bundle/utils"
11
11
"github.com/databricks/cli/cmd/root"
12
12
"github.com/databricks/cli/libs/cmdio"
13
+
"github.com/databricks/cli/libs/logdiag"
13
14
"github.com/spf13/cobra"
14
15
)
15
16
@@ -55,7 +56,7 @@ proper state management as it may cause resource conflicts.`,
55
56
ctx:=cmd.Context()
56
57
57
58
ifstateDesc.Lineage=="" {
58
-
cmdio.LogString(ctx, `This command migrate existing terraform state file to direct deployment engine state. However, no existing local or remote state found.
59
+
cmdio.LogString(ctx, `This command migrates existing terraform state file (terraform.tfstate) to direct deployment engine state file (resources.json). However, no existing local or remote state found.
59
60
60
61
To start using direct engine, deploy with DATABRICKS_BUNDLE_ENGINE=direct env var or bundle.engine="direct" in databricks.yml.`)
61
62
returnroot.ErrAlreadyPrinted
@@ -65,6 +66,11 @@ To start using direct engine, deploy with DATABRICKS_BUNDLE_ENGINE=direct env va
65
66
returnfmt.Errorf("already using direct engine\nDetails: %s", stateDesc.String())
0 commit comments