Skip to content

docs: describe how secrets reach a workspace#25538

Merged
zedkipp merged 1 commit into
mainfrom
zedkipp/secrets-docs
May 22, 2026
Merged

docs: describe how secrets reach a workspace#25538
zedkipp merged 1 commit into
mainfrom
zedkipp/secrets-docs

Conversation

@zedkipp

@zedkipp zedkipp commented May 20, 2026

Copy link
Copy Markdown
Contributor

Replace the brief runtime-behavior paragraph with a dedicated section covering when env and file secrets appear in a workspace, what the running workspace sees, and how create/update/delete propagate. Call out that Coder never removes secret files it has written, so deleting a secret or changing its file path leaves the previous file on disk.

@github-actions

Copy link
Copy Markdown

Docs preview

📖 View docs preview for docs/user-guides/user-secrets.md

@zedkipp zedkipp changed the title docs(user-guides/user-secrets): describe how secrets reach a workspace docs: describe how secrets reach a workspace May 20, 2026
@zedkipp zedkipp marked this pull request as ready for review May 20, 2026 21:58
Comment on lines +75 to +78
If you set two file secrets that resolve to the same absolute path (for
example `~/config` and `/home/coder/config`), only one of them ends up on
disk; the workspace agent logs a warning to help spot this. Use
distinct paths to avoid the collision.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it would be tricky to catch these collisions when someone is setting the secrets?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think there's an easy way to know this ahead of time. We're planning to surface these collisions when the workspace starts before GA.

Comment thread docs/user-guides/user-secrets.md Outdated
Comment on lines +72 to +73
> a terminal in your workspace and run `rm <path>`. Rebuilding the workspace
> also clears stale files when your template recreates the filesystem.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> a terminal in your workspace and run `rm <path>`. Rebuilding the workspace
> also clears stale files when your template recreates the filesystem.
> a terminal in your workspace and run `rm <path>`. Rebuilding the workspace
> may also clears stale files when your template recreates the filesystem.

Adding may as we can not be sure if a workspace restart recreates filesystem or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

Comment thread docs/user-guides/user-secrets.md
Replace the brief runtime-behavior paragraph with a dedicated section
covering when env and file secrets appear in a workspace, what the
running workspace sees, and how create/update/delete propagate. Call
out that Coder never removes secret files it has written, so deleting a
secret or changing its file path leaves the previous file on disk.

Co-Authored-By: Coder Agents <noreply@coder.com>
@zedkipp zedkipp force-pushed the zedkipp/secrets-docs branch from 56ec19c to efd07fd Compare May 21, 2026 17:28
@zedkipp zedkipp merged commit a896227 into main May 22, 2026
26 checks passed
@zedkipp zedkipp deleted the zedkipp/secrets-docs branch May 22, 2026 20:06
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants