Skip to main content
The ctrlc api upsert version command creates or updates a deployment version in Ctrlplane. This is typically called from CI/CD pipelines after a successful build.

Usage

ctrlc api upsert version \
  --workspace <workspace> \
  --deployment <deployment-id> \
  --tag <version-tag> \
  [--name "<version-name>"] \
  [--metadata key=value ...]

Flags

FlagRequiredDescription
--workspaceYesWorkspace name or ID
--deploymentYesDeployment ID
--tagYesUnique version identifier
--nameNoHuman-readable version name
--metadataNoKey-value metadata (repeatable)

Example

ctrlc api upsert version \
  --workspace my-workspace \
  --deployment dep_abc123 \
  --tag v1.2.3 \
  --name "Release 1.2.3" \
  --metadata git/commit=abc123 \
  --metadata git/branch=main
The command is idempotent — running it again with the same --tag updates the existing version rather than creating a duplicate.

Next Steps