tractorbeam secret
Manage encrypted Secret values.
tractorbeam secret <subcommand> [flags]
Every subcommand takes these flags.
Set a Secret’s value on a Branch in a new version, the Branch’s own. On main, each Branch without its own version uses it too. The value has to match the Secret’s schema on the Branch.
tractorbeam secret set [flags] <secret>
Examples:
# Set the stripe Secret from a JSON file
tractorbeam secret set stripe --file stripe.json
# Set it from standard input
tractorbeam secret set stripe < stripe.json
Returns each Secret the Branch’s HEAD selects, with the schema its value has to match there and whether it has a value. The response leaves out each value. Needs secrets:read; an App token can’t list Secrets.
tractorbeam secret list [flags]
Records a deletion as a new version of the Secret’s value, the Branch’s own, as setting a value does. After that, an Action listing the Secret fails on the Branch until it has a value again. Other Branches keep their own versions; on the default Branch, each Branch without its own version loses its value too. Having the Branch use an earlier version undoes the deletion. A retried request is safe. When the Branch already uses a deletion or has no value, Tractorbeam returns 204 without recording another version. Needs Workspace authority; an App token can’t delete a Secret’s value.
tractorbeam secret delete-value [flags] <secret>
Returns the versions Tractorbeam keeps of the Secret’s value, newest first, each with who wrote it and when, its state, and the Branches using it as their own. The response leaves out each value. Past 100 versions, Tractorbeam drops the oldest version no Branch uses. Needs secrets:read; an App token can’t list a Secret’s versions.
tractorbeam secret list-versions [flags] <secret>
Has the Branch use a kept version of the Secret’s value as its own. Its Actions get that version until the Branch is cleared, or its value is set or deleted again; writes and deletions on other Branches leave it in place. On the default Branch, it changes the version each Branch without its own uses. Use that to roll back a write or undo a deletion. Returns 409 for a version recording a deletion. Needs Workspace authority; an App token can’t set the version a Branch uses.
tractorbeam secret set-branch-version [flags] <secret>
Has the Branch use the default Branch’s version of the Secret again. A Branch without its own version returns 204 too. Returns 400 for the default Branch, whose version the others fall back to. Needs Workspace authority; an App token can’t clear the version a Branch uses.
tractorbeam secret clear-branch-version [flags] <secret>