Canonical: https://weaveos.com/reference/pulumi/preview-stack-changes

1. [Software capabilities](https://weaveos.com/reference)
2. /[Pulumi](https://weaveos.com/reference/pulumi)
3. /Preview Pulumi stack changes

[![](https://weaveos.com/reference/logos/pulumi.svg)Pulumi](https://weaveos.com/reference/pulumi)

# Preview Pulumi stack changes

Preview a Pulumi stack to review planned creates, updates, replacements, and deletions. Use the CLI for the full diff and the Automation API to consume per-operation counts in code.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1CLI: pulumi preview](https://weaveos.com/reference/pulumi/preview-stack-changes#method-1)
2. [2SDK: stack.preview()](https://weaveos.com/reference/pulumi/preview-stack-changes#method-2)

CLI

### pulumi preview

Compute proposed resource changes without applying them.

[Read source: Pulumi preview command](https://www.pulumi.com/docs/iac/cli/commands/pulumi_preview/)

- Requirements

  The Pulumi CLI, a project, state backend access, and credentials for any providers the program reads.

- Limitations

  The diff compares the program with recorded stack state by default. Add --refresh when the preview needs to account for changes outside Pulumi.

Example shell

Copy

```
pulumi preview --stack "$PULUMI_STACK" --diff --non-interactive
```

SDK

### stack.preview()

Run a dry-run update on a selected Node.js Automation API Stack and read its changeSummary map.

[Read source: Pulumi Node.js Automation API Stack.preview](https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/classes/automation.Stack.html#preview)

- Requirements

  An initialized Stack from the @pulumi/pulumi Automation API, the Pulumi CLI, and access to the stack backend and providers.

- Limitations

  Preview still runs the project program. The change summary counts operations, while onOutput streams the detailed preview.

Example text

Copy

```
const result = await stack.preview({ onOutput: console.log });
console.log(result.changeSummary);
```

## More from Pulumi

[View all 1 Pulumi tasks](https://weaveos.com/reference/pulumi)
