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
+21 -1
View File
@@ -26,11 +26,31 @@ ensures your templates are validated, tested, and promoted seamlessly.
## Creating the headless user
> [!WARNING]
> Creating users with `--login-type none` is deprecated.
> For [Premium](https://coder.com/pricing) deployments, use
> [service accounts](../admin/users/headless-auth.md) instead.
> For OSS deployments, use a regular account with password, GitHub, or OIDC
> authentication.
For Premium deployments, create a service account:
```shell
coder users create \
--username machine-user \
--service-account
coder tokens create --user machine-user --lifetime 8760h
# Copy the token and store it in a secret in your CI environment with the name `CODER_SESSION_TOKEN`
```
For OSS deployments, create a regular user:
```shell
coder users create \
--username machine-user \
--email machine-user@example.com \
--login-type none
--login-type password
coder tokens create --user machine-user --lifetime 8760h
# Copy the token and store it in a secret in your CI environment with the name `CODER_SESSION_TOKEN`