Skip to content

docs: document workspace naming rules and restrictions #17312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions codersdk/organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ type CreateTemplateRequest struct {
// @Description CreateWorkspaceRequest provides options for creating a new workspace.
// @Description Only one of TemplateID or TemplateVersionID can be specified, not both.
// @Description If TemplateID is specified, the active version of the template will be used.
// @Description Workspace names:
// @Description - Must start with a letter or number
// @Description - Can only contain letters, numbers, and hyphens
// @Description - Cannot contain spaces or special characters
// @Description - Cannot be named `new` or `create`
// @Description - Must be unique within your workspaces
// @Description - Maximum length of 32 characters
type CreateWorkspaceRequest struct {
// TemplateID specifies which template should be used for creating the workspace.
TemplateID uuid.UUID `json:"template_id,omitempty" validate:"required_without=TemplateVersionID,excluded_with=TemplateVersionID" format:"uuid"`
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions docs/user-guides/workspace-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ coder create --template="<templateName>" <workspaceName>
coder show <workspace-name>
```

### Workspace name rules and restrictions

| Constraint | Rule |
|------------------|--------------------------------------------|
| Start/end with | Must start and end with a letter or number |
| Character types | Letters, numbers, and hyphens only |
| Length | 1-32 characters |
| Case sensitivity | Case-insensitive (lowercase recommended) |
| Reserved names | Cannot use `new` or `create` |
| Uniqueness | Must be unique within your workspaces |

## Workspace filtering

In the Coder UI, you can filter your workspaces using pre-defined filters or
Expand Down
Loading