← 返回命令列表

Linux command

pulumi-refresh 命令

文本

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

常用示例

Refresh state from cloud

pulumi refresh

Refresh specific stack

pulumi refresh -s [stack]

Refresh with auto-approval

pulumi refresh --yes

Refresh specific resources

pulumi refresh --target [urn]

Refresh and fail if changes are detected

pulumi refresh --expect-no-changes

Refresh with JSON output

pulumi refresh --json

说明

pulumi refresh updates stack state to match actual cloud resources. Detects drift between Pulumi state and real infrastructure. Run before updates when resources may have changed outside Pulumi.

参数

-s, --stack _name_
Target stack.
-y, --yes
Skip confirmation.
--target _urn_
Refresh specific resources.
-m, --message _string_
Message to associate with the update operation.
-j, --json
Serialize the refresh diffs and output as JSON.
--expect-no-changes
Return an error if any changes occur during refresh.
--exclude _urn_
Exclude specific resources from refresh (supports wildcards).
--import-pending-creates
Import resources that were created during pending operations.
--clear-pending-creates
Remove any pending CREATEs from state.
-p, --parallel _n_
Parallelism level (1 for no parallelism).

FAQ

What is the pulumi-refresh command used for?

pulumi refresh updates stack state to match actual cloud resources. Detects drift between Pulumi state and real infrastructure. Run before updates when resources may have changed outside Pulumi.

How do I run a basic pulumi-refresh example?

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

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

Target stack.