Skip to content
Skip to Content
Coder Docs

coder secret create

Create a secret.

On this page

Create a secret

Usage

Usage
coder secret create [flags] <name>

Description

Description
Provide the secret value with --value or non-interactive stdin (pipe or redirect).

Options

Options

--value

--value
PropertyValue
Typestring

Set the secret value. For security reasons, prefer non-interactive stdin (pipe or redirect).

--description

--description
PropertyValue
Typestring

Set the secret description.

--env

--env
PropertyValue
Typestring

Name of the workspace environment variable that this secret will set.

--file

--file
PropertyValue
Typestring

Workspace file path where this secret will be written. Must start with ~/ or /.

--enabled

--enabled
PropertyValue
Typebool
Defaulttrue

Whether the secret is injected into workspaces. An enabled secret must set --env or --file; pass --enabled=false to store a secret without injecting it.