dcloud secrets environments promote

Copy a secret into another environment (or its source reference, if synced)

IAM secrets:PromoteSecretChanges stateAsks before it deletes (-y skips)

A stored secret: its active value becomes a new version of the same-named secret in the target (created under the same key if missing). A synced secret: give `reference`; without it the answer is 409 with `suggestedReference` (the vault swapped for the target environment). Grants are not copied.

Synopsis

dcloud secrets environments promote id --to-environment-id toEnvironmentId [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

Flags

  • --to-environment-idRequired

    string

    The environment to promote into (an environment id), or null for Default, the value every environment falls back to. The secret’s own environment is refused with 400; an unknown id with 404.

    May be null.

  • --referenceOptional

    string

    Synced secrets only: the source reference the target should sync from, e.g. op://Production/db/password, up to 512 characters. Omitted for a synced secret: 409 with `suggestedReference` (the reference with the vault swapped for the target environment) to confirm and send back. Ignored for a stored secret.

    Constraints: 1-512 chars

Example

dcloud secrets environments promote id --to-environment-id example

Generated from the API description, the same one the API checks requests against and the CLI is built from.