← 返回命令列表

Linux command

pulumi-preview 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Preview changes

pulumi preview

Preview specific stack

pulumi preview -s [stack]

Preview with detailed diff

pulumi preview --diff

Preview in JSON format

pulumi preview --json

Preview specific targets

pulumi preview --target [urn]

说明

pulumi preview computes and displays the set of resource operations that pulumi up would perform, without actually making any changes. It compares the desired state described in the program with the current state recorded for the stack (optionally refreshed from the cloud), and reports the create/update/replace/delete operations that would result. Use --diff for a full property-level view of what would change, and --expect-no-changes in CI pipelines to detect drift between the program and the deployed infrastructure.

参数

-s, --stack _name_
Target stack name.
--diff
Show detailed property-level diff for each changed resource.
--json
Emit machine-readable JSON output.
--target _urn_
Preview operations only on the listed resource URNs (repeatable).
--target-dependents
Also include resources that depend on the targeted ones.
--refresh
Refresh state from the cloud provider before computing the preview.
--expect-no-changes
Exit with a non-zero status if any changes are detected. Useful for CI drift detection.
-p, --parallel _n_
Maximum number of resource operations to run concurrently.
--config _key=value_
Override a config value for this preview.
--message _text_
Optional message recorded with the update.
--show-replacement-steps
Show the underlying create/delete steps that make up a replacement.

FAQ

What is the pulumi-preview command used for?

pulumi preview computes and displays the set of resource operations that pulumi up would perform, without actually making any changes. It compares the desired state described in the program with the current state recorded for the stack (optionally refreshed from the cloud), and reports the create/update/replace/delete operations that would result. Use --diff for a full property-level view of what would change, and --expect-no-changes in CI pipelines to detect drift between the program and the deployed infrastructure.

How do I run a basic pulumi-preview example?

Run `pulumi preview` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -s, --stack _name_ do in pulumi-preview?

Target stack name.