databricks-cli/cmd/bundle
Lennart Kats (databricks) a5b86093ec
Add a foundation for built-in templates (#685)
## Changes

This pull request extends the templating support in preparation of a
new, default template (WIP, https://github.com/databricks/cli/pull/686):
* builtin templates that can be initialized using e.g. `databricks
bundle init default-python`
* builtin templates are embedded into the executable using go's `embed`
functionality, making sure they're co-versioned with the CLI
* new helpers to get the workspace name, current user name, etc. help
craft a complete template
* (not enabled yet) when the user types `databricks bundle init` they
can interactively select the `default-python` template

And makes two tangentially related changes:
* IsServicePrincipal now uses the "users" API rather than the
"principals" API, since the latter is too slow for our purposes.
* mode: prod no longer requires the 'target.prod.git' setting. It's hard
to set that from a template. (Pieter is planning an overhaul of warnings
support; this would be one of the first warnings we show.)

The actual `default-python` template is maintained in a separate PR:
https://github.com/databricks/cli/pull/686

## Tests
Unit tests, manual testing
2023-08-25 09:03:42 +00:00
..
bundle.go Add bundle init command and support for prompting user for input values (#631) 2023-08-07 13:14:25 +00:00
deploy.go Correct name for force acquire deploy flag (#656) 2023-08-15 19:03:43 +00:00
destroy.go Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00
init.go Add a foundation for built-in templates (#685) 2023-08-25 09:03:42 +00:00
init_test.go Add bundle init command and support for prompting user for input values (#631) 2023-08-07 13:14:25 +00:00
launch.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
run.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
schema.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
sync.go Added support for sync.include and sync.exclude sections (#671) 2023-08-18 08:07:25 +00:00
test.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
validate.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
variables.go Renamed `environments` to `targets` in bundle configuration (#670) 2023-08-17 15:22:32 +00:00