chore: deprecate template create command in favor of template push (#11390)

This commit is contained in:
Garrett Delfosse
2024-01-05 16:04:14 -05:00
committed by GitHub
parent 3d54bc06f6
commit b21da38bea
42 changed files with 498 additions and 420 deletions

View File

@ -35,6 +35,7 @@ func (r *RootCmd) templateEdit() *clibase.Cmd {
allowUserAutostop bool
requireActiveVersion bool
deprecationMessage string
disableEveryone bool
)
client := new(codersdk.Client)
@ -162,6 +163,7 @@ func (r *RootCmd) templateEdit() *clibase.Cmd {
AllowUserAutostop: allowUserAutostop,
RequireActiveVersion: requireActiveVersion,
DeprecationMessage: deprecated,
DisableEveryoneGroupAccess: disableEveryone,
}
_, err = client.UpdateTemplateMeta(inv.Context(), template.ID, req)
@ -292,6 +294,13 @@ func (r *RootCmd) templateEdit() *clibase.Cmd {
Value: clibase.BoolOf(&requireActiveVersion),
Default: "false",
},
{
Flag: "private",
Description: "Disable the default behavior of granting template access to the 'everyone' group. " +
"The template permissions must be updated to allow non-admin users to use this template.",
Value: clibase.BoolOf(&disableEveryone),
Default: "false",
},
cliui.SkipPromptOption(),
}