Skip to content

Commit 5135776

Browse files
authored
Remove unnecessary tf.Init() call from statemgmt.Load() (#3805)
1 parent b2c8c46 commit 5135776

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

bundle/statemgmt/state_load.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"github.com/databricks/cli/bundle/statemgmt/resourcestate"
1414
"github.com/databricks/cli/libs/diag"
1515
"github.com/databricks/cli/libs/dyn"
16-
"github.com/hashicorp/terraform-exec/tfexec"
1716
)
1817

1918
type (
@@ -47,11 +46,7 @@ func (l *load) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics {
4746
return diag.Errorf("terraform not initialized")
4847
}
4948

50-
err := tf.Init(ctx, tfexec.Upgrade(true))
51-
if err != nil {
52-
return diag.Errorf("terraform init: %v", err)
53-
}
54-
49+
var err error
5550
state, err = terraform.ParseResourcesState(ctx, b)
5651
if err != nil {
5752
return diag.FromErr(err)

0 commit comments

Comments
 (0)