mirror of
https://github.com/coder/coder.git
synced 2026-09-22 13:10:21 +08:00
Users can now disable a secret to stop it from being injected into workspaces without deleting it, and re-enable it later. Disabled secrets stay visible and editable everywhere they already appear. An enabled secret must have at least one injection target; a secret with no target can be stored only while disabled. Existing target-less secrets are migrated to disabled to preserve current behavior. Support spans the REST API, SDK, CLI, dashboard, and audit log.
1.4 KiB
Generated
1.4 KiB
Generated
secret
Manage secrets
Aliases:
- secrets
Usage
coder secret
Description
- Create a secret:
$ printf %s "$MYCLI_API_KEY" | coder secret create api-key --description "API key for workspace tools" --env API_KEY --file "~/.api-key"
- Update a secret:
$ echo -n "$NEW_SECRET_VALUE" | coder secret update api-key --description "Rotated API key" --env API_KEY --file "~/.api-key"
- List your secrets:
$ coder secret list
- Show a specific secret:
$ coder secret list api-key
- Delete a secret:
$ coder secret delete api-key
Subcommands
| Name | Purpose |
|---|---|
create |
Create a secret |
update |
Update a secret |
enable |
Enable a secret so it is injected into workspaces |
disable |
Disable a secret without removing it |
list |
List secrets, or show one by name |
delete |
Delete a secret |