diff --git a/internal/cmd/group.go b/internal/cmd/group.go index 1d68d3b7..bb2f7447 100644 --- a/internal/cmd/group.go +++ b/internal/cmd/group.go @@ -23,7 +23,7 @@ func init() { groupCmd.AddCommand(unarchiveGroupCmd) addLocationFlag(groupsCreateCmd, "Create the group primary in the specified location") addWaitFlag(groupsCreateCmd, "Wait for group to be ready") - flags.AddVersion(groupsCreateCmd, "Version of the group. Valid values: 'latest' or 'vector'") + flags.AddVersion(groupsCreateCmd, "Version of the group. Valid values: 'latest', or a specific turso-server version tag (e.g. 'v0.34.2') to pin the group — and every database in it — to a fleet running exactly that version (restricted to internal Turso users)") groupCmd.AddCommand(groupsDestroyCmd) addYesFlag(groupsDestroyCmd, "Confirms the destruction of the group, with all its locations and databases.") groupCmd.AddCommand(groupShowCmd) diff --git a/internal/flags/version.go b/internal/flags/version.go index c738281a..5d546188 100644 --- a/internal/flags/version.go +++ b/internal/flags/version.go @@ -6,6 +6,13 @@ import ( var versionFlag string +// AddVersion registers --version. Beyond "latest", the API accepts a specific +// turso-server version tag (e.g. "v0.34.2") from internal Turso users: the +// value is stamped as the turso.io/server-image marker on the group's +// provision request, so the group — and every database in it — is placed on a +// db-api fleet running exactly that version (composed from a matching dynamic +// fleet template). Validation is server-side; the CLI passes the value +// through untouched. func AddVersion(cmd *cobra.Command, desc string) { cmd.Flags().StringVar(&versionFlag, "version", "", desc) _ = cmd.RegisterFlagCompletionFunc("version", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {