docs: add deprecation warning for login-type none (#24594)

The `--login-type none` option for `coder users create` is deprecated.
This adds deprecation warnings to all docs that reference it and updates
the CI/CD tutorial to recommend the replacement flows.

Refs DEVEX-224

<details>
<summary>Changes</summary>

- `cli/usercreate.go`: Append deprecation notice to `--login-type` flag
description.
- `docs/tutorials/testing-templates.md`: Replace `--login-type none`
example with separate Premium (`--service-account`) and OSS
(`--login-type password`) examples.
- `docs/reference/cli/users_create.md`: Regenerated from CLI source.
- `cli/testdata/coder_users_create_--help.golden`: Updated golden
snapshot.

</details>

> [!NOTE]
> Generated by Coder Agents.
This commit is contained in:
Sushant P
2026-04-27 22:51:01 +00:00
committed by GitHub
parent d78a78ffa1
commit 4820f13eb4
5 changed files with 33 additions and 6 deletions
+3 -1
View File
@@ -19,7 +19,9 @@ OPTIONS:
Optionally specify the login type for the user. Valid values are:
password, none, github, oidc. Using 'none' prevents the user from
authenticating and requires an API key/token to be generated by an
admin.
admin. Deprecated: 'none' is deprecated. Use service accounts
(requires Premium) for machine-to-machine access, or
password/github/oidc login types for regular user accounts.
-p, --password string
Specifies a password for the new user.
+3 -1
View File
@@ -207,7 +207,9 @@ Create a workspace `+pretty.Sprint(cliui.DefaultStyles.Code, "coder create")+`!
{
Flag: "login-type",
Description: fmt.Sprintf("Optionally specify the login type for the user. Valid values are: %s. "+
"Using 'none' prevents the user from authenticating and requires an API key/token to be generated by an admin.",
"Using 'none' prevents the user from authenticating and requires an API key/token to be generated by an admin. "+
"Deprecated: 'none' is deprecated. Use service accounts (requires Premium) for machine-to-machine access, "+
"or password/github/oidc login types for regular user accounts.",
strings.Join([]string{
string(codersdk.LoginTypePassword), string(codersdk.LoginTypeNone), string(codersdk.LoginTypeGithub), string(codersdk.LoginTypeOIDC),
}, ", ",