Skip to main content
Version: v5.6.1

opschain templates version lock

templates

opschain templates version lock <project>/<code> --version <v>

Locks a template version: its pinned revision and metadata become read-only until unlocked. Lock a version once it is proven, so nothing repins or re-describes it behind the assets built on it — a locked version only accepts its own unlock. While locked the version also cannot be marked as floating.

Flags​

FlagMeaning
--version <v>The version to lock (required).
--ignore-in-useDeprecated: lock has no in-use refusal to override. The flag is still accepted (a warning names unlock, archive and upsert as the verbs it applies to) but nothing is sent.

Exit codes​

CodeMeaning
0Locked — prints locked version <v> of <project>/<code>.
1The template was not found, or the server refused the lock.
2Usage error — missing required flag, malformed address, no server target.

Named errors​

  • required flag(s) "version" not set — exit 2.
  • expected <project>/<template-code>, got "<arg>" — exit 2.
  • template "<code>" not found in project "<project>" — exit 1.

Example​

opschain templates version lock demo/web_stack --version 1.0.0
locked version 1.0.0 of demo/web_stack

See also​

  • opschain docs cli/templates-version-unlock — lift the lock.
  • opschain docs cli/templates-version-upsert — the writes a lock blocks.