databricks-cli/cmd/bundle/variables.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
499 B
Go
Raw Normal View History

package bundle
import (
2025-01-21 17:00:39 +00:00
"fmt"
"github.com/spf13/cobra"
2025-01-21 17:00:39 +00:00
"github.com/databricks/cli/cmd/bundle/utils"
)
func initVariableFlag(cmd *cobra.Command) {
cmd.PersistentFlags().StringSlice("var", []string{}, `set values for variables defined in bundle config. Example: --var="foo=bar"`)
2025-01-21 17:00:39 +00:00
cmd.PersistentFlags().String("var-file", "", fmt.Sprintf(`file path to a JSON file containing variables. Example: --var-file="/path/to/vars.json" (default "%s")`, utils.GetDefaultVariableFilePath("<target>")))
}