Skip to content

Commit d5c6cb6

Browse files
denikIsaac
andcommitted
Inline allowTerraformEngineConfig in bundle run
Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 4e84989 commit d5c6cb6

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎cmd/bundle/run.go‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ Example usage:
138138
if cmd.ArgsLenAtDash() == 0 && len(args) > 0 {
139139
b, err := utils.ProcessBundle(cmd, utils.ProcessOptions{
140140
SkipInitialize: true,
141-
InitFunc: allowTerraformEngineConfig,
141+
InitFunc: func(b *bundle.Bundle) {
142+
b.AllowTerraformEngineConfig = true
143+
},
142144
})
143145
if err != nil {
144146
return err
@@ -155,7 +157,10 @@ Example usage:
155157
_, _, err := utils.ProcessBundleRet(cmd, utils.ProcessOptions{
156158
AlwaysPull: true,
157159
ErrorOnEmptyState: true,
158-
InitFunc: allowTerraformEngineConfig,
160+
// Let users run a bundle that pins the removed Terraform engine.
161+
InitFunc: func(b *bundle.Bundle) {
162+
b.AllowTerraformEngineConfig = true
163+
},
159164
PostInitFunc: func(ctx context.Context, b *bundle.Bundle) error {
160165
var err error
161166
key, runArgs, err = resolveRunArgument(ctx, b, args)
@@ -318,8 +323,3 @@ func executeInline(cmd *cobra.Command, args []string, b *bundle.Bundle) error {
318323
Dir: dir,
319324
})
320325
}
321-
322-
// allowTerraformEngineConfig lets users run resources of a bundle that pins the removed Terraform engine.
323-
func allowTerraformEngineConfig(b *bundle.Bundle) {
324-
b.AllowTerraformEngineConfig = true
325-
}

0 commit comments

Comments
 (0)