Skip to content

Commit b2c8c46

Browse files
authored
Remove terraform.Write/Interpolate calls from various commands (#3804)
## Changes Remove terraform.Write/Interpolate calls from various commands - bundle generate dashboard - bundle open - pipelines open / run / stop / dry_run ## Why Follow up to #3803 and #3169 There used to be 'terraform show' call that needed it, but it's no longer used. ## Tests Existing tests.
1 parent 04ae5cc commit b2c8c46

File tree

6 files changed

+0
-58
lines changed

6 files changed

+0
-58
lines changed

cmd/bundle/generate/dashboard.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"time"
1515

1616
"github.com/databricks/cli/bundle"
17-
"github.com/databricks/cli/bundle/deploy/terraform"
1817
"github.com/databricks/cli/bundle/generate"
1918
"github.com/databricks/cli/bundle/phases"
2019
"github.com/databricks/cli/bundle/resources"
@@ -362,8 +361,6 @@ func (d *dashboard) runForResource(ctx context.Context, b *bundle.Bundle) {
362361
}
363362

364363
bundle.ApplySeqContext(ctx, b,
365-
terraform.Interpolate(),
366-
terraform.Write(),
367364
statemgmt.StatePull(),
368365
statemgmt.Load(),
369366
)

cmd/bundle/open.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,6 @@ Use after deployment to quickly navigate to your resources in the workspace.`,
104104
if logdiag.HasError(ctx) {
105105
return root.ErrAlreadyPrinted
106106
}
107-
108-
if !b.DirectDeployment {
109-
bundle.ApplySeqContext(ctx, b,
110-
terraform.Interpolate(),
111-
terraform.Write(),
112-
)
113-
}
114-
115-
if logdiag.HasError(ctx) {
116-
return root.ErrAlreadyPrinted
117-
}
118107
}
119108

120109
bundle.ApplySeqContext(ctx, b,

cmd/pipelines/dry_run.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88

99
"github.com/databricks/cli/bundle"
10-
"github.com/databricks/cli/bundle/deploy/terraform"
1110
"github.com/databricks/cli/bundle/phases"
1211
"github.com/databricks/cli/bundle/resources"
1312
"github.com/databricks/cli/bundle/run"
@@ -54,16 +53,6 @@ If there is only one pipeline in the project, KEY is optional and the pipeline w
5453
return err
5554
}
5655

57-
if !b.DirectDeployment {
58-
bundle.ApplySeqContext(ctx, b,
59-
terraform.Interpolate(),
60-
terraform.Write(),
61-
)
62-
if logdiag.HasError(ctx) {
63-
return root.ErrAlreadyPrinted
64-
}
65-
}
66-
6756
bundle.ApplySeqContext(ctx, b,
6857
statemgmt.StatePull(),
6958
statemgmt.Load(statemgmt.ErrorOnEmptyState),

cmd/pipelines/open.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,6 @@ If there is only one pipeline in the project, KEY is optional and the pipeline w
8888
if logdiag.HasError(ctx) {
8989
return root.ErrAlreadyPrinted
9090
}
91-
92-
if !b.DirectDeployment {
93-
bundle.ApplySeqContext(ctx, b,
94-
terraform.Interpolate(),
95-
terraform.Write(),
96-
)
97-
}
98-
99-
if logdiag.HasError(ctx) {
100-
return root.ErrAlreadyPrinted
101-
}
10291
}
10392

10493
bundle.ApplySeqContext(ctx, b,

cmd/pipelines/run.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212

1313
"github.com/databricks/cli/bundle"
1414
"github.com/databricks/cli/bundle/config/resources"
15-
"github.com/databricks/cli/bundle/deploy/terraform"
1615
"github.com/databricks/cli/bundle/phases"
1716
bundleresources "github.com/databricks/cli/bundle/resources"
1817
"github.com/databricks/cli/bundle/run"
@@ -274,16 +273,6 @@ Refreshes all tables in the pipeline unless otherwise specified.`,
274273
return err
275274
}
276275

277-
if !b.DirectDeployment {
278-
bundle.ApplySeqContext(ctx, b,
279-
terraform.Interpolate(),
280-
terraform.Write(),
281-
)
282-
if logdiag.HasError(ctx) {
283-
return root.ErrAlreadyPrinted
284-
}
285-
}
286-
287276
bundle.ApplySeqContext(ctx, b,
288277
statemgmt.StatePull(),
289278
statemgmt.Load(statemgmt.ErrorOnEmptyState),

cmd/pipelines/stop.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
"github.com/databricks/cli/bundle"
99

10-
"github.com/databricks/cli/bundle/deploy/terraform"
1110
"github.com/databricks/cli/bundle/phases"
1211
"github.com/databricks/cli/bundle/resources"
1312
"github.com/databricks/cli/bundle/run"
@@ -68,16 +67,6 @@ If there is only one pipeline in the project, KEY is optional and the pipeline w
6867
return err
6968
}
7069

71-
if !b.DirectDeployment {
72-
bundle.ApplySeqContext(ctx, b,
73-
terraform.Interpolate(),
74-
terraform.Write(),
75-
)
76-
if logdiag.HasError(ctx) {
77-
return root.ErrAlreadyPrinted
78-
}
79-
}
80-
8170
bundle.ApplySeqContext(ctx, b,
8271
statemgmt.StatePull(),
8372
statemgmt.Load(statemgmt.ErrorOnEmptyState),

0 commit comments

Comments
 (0)