dcloud deploy env import

Import a .env or .env.op file — dry run for the plan, then apply atomically

IAM deploy:ManageEnvChanges stateAsks before it deletes (-y skips)

dcloud deploy env import <appId> --content "$(cat .env.op)" --preview. op:// references become synced secrets; sensitive-looking values become secrets, the rest plain (override per key with classify); dcloud-secret://NAME (or ews-secret://NAME) binds an existing secret. mode=merge keeps keys the file omits, replace removes them. Nothing is applied if any key has an error. No value is ever echoed back. Saving does not restart the app. Pass redeploy: true to roll the live deployment’s own source onto the new configuration (also needs deploy:DeployApp); otherwise the response and GET …/env report pending until someone redeploys.

Synopsis

dcloud deploy env import id --content content [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: uuid

Flags

  • --contentRequired

    string

    The .env / .env.op file text

    Constraints: max 524288 chars

  • --modeOptional

    enum

    merge (default) keeps variables the file does not mention; replace removes them

    One of: merge, replace

  • --classifyOptional

    map of string

    Per key, plain or secret, overriding the kind the import would pick

    Constraints: key=value

  • --sourceOptional

    string

    Secret source (by name) for NEW op:// references, needed only when several sources reach the vault

    Constraints: 2-63 chars

    May be null.

  • --source-idOptional

    string

    The same secret source as source, by id (the older spelling)

    Constraints: uuid

    May be null.

  • --key-idOptional

    string

    KMS key new secrets are encrypted under; default the organization’s default key

    Constraints: uuid

    May be null.

  • --previewOptional

    boolean (--preview / --no-preview)

    Return the plan without changing anything; default false

  • --redeployOptional

    boolean (--redeploy / --no-redeploy)

    Also roll the live deployment onto the imported environment; default false, ignored with preview

Example

dcloud deploy env import id --content example

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