github.com/databricks/cli@v0.203.0/bundle/phases/initialize.go (about) 1 package phases 2 3 import ( 4 "github.com/databricks/cli/bundle" 5 "github.com/databricks/cli/bundle/config/interpolation" 6 "github.com/databricks/cli/bundle/config/mutator" 7 "github.com/databricks/cli/bundle/config/variable" 8 "github.com/databricks/cli/bundle/deploy/terraform" 9 ) 10 11 // The initialize phase fills in defaults and connects to the workspace. 12 // Interpolation of fields referring to the "bundle" and "workspace" keys 13 // happens upon completion of this phase. 14 func Initialize() bundle.Mutator { 15 return newPhase( 16 "initialize", 17 []bundle.Mutator{ 18 mutator.PopulateCurrentUser(), 19 mutator.DefineDefaultWorkspaceRoot(), 20 mutator.ExpandWorkspaceRoot(), 21 mutator.DefineDefaultWorkspacePaths(), 22 mutator.SetVariables(), 23 interpolation.Interpolate( 24 interpolation.IncludeLookupsInPath("bundle"), 25 interpolation.IncludeLookupsInPath("workspace"), 26 interpolation.IncludeLookupsInPath(variable.VariableReferencePrefix), 27 ), 28 mutator.OverrideCompute(), 29 mutator.ProcessEnvironmentMode(), 30 mutator.TranslatePaths(), 31 terraform.Initialize(), 32 }, 33 ) 34 }