dcloud deploy env importImport a .env or .env.op file — dry run for the plan, then apply atomically
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>Requiredstring
Also accepted as
--id. Constraints: uuid
Flags
--contentRequiredstring
The .env / .env.op file text
Constraints: max 524288 chars
--modeOptionalenum
merge (default) keeps variables the file does not mention; replace removes them
One of:
merge,replace--classifyOptionalmap of string
Per key, plain or secret, overriding the kind the import would pick
Constraints: key=value
--sourceOptionalstring
Secret source (by name) for NEW op:// references, needed only when several sources reach the vault
Constraints: 2-63 chars
May be null.
--source-idOptionalstring
The same secret source as source, by id (the older spelling)
Constraints: uuid
May be null.
--key-idOptionalstring
KMS key new secrets are encrypted under; default the organization’s default key
Constraints: uuid
May be null.
--previewOptionalboolean (--preview / --no-preview)
Return the plan without changing anything; default false
--redeployOptionalboolean (--redeploy / --no-redeploy)
Also roll the live deployment onto the imported environment; default false, ignored with preview
Example
dcloud deploy env import id --content exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.