Skip to content

Resource option: hideDiffs ​

The hideDiffs resource option specifies a list of property paths whose diff details Pulumi compacts in CLI output. Setting hideDiffs does not affect what resources are updated, only how those updates are displayed.

INFO

Unlike ignoreChanges, hideDiffs does not affect which properties trigger updates. If you want to prevent updates based on property changes, use the ignoreChanges option instead.

How hideDiffs works ​

When you set hideDiffs on a resource property, Pulumi:

  1. Still detects and processes all changes to that property during preview and update operations.
  2. Compacts the diff display in the CLI, hiding the details of what changed within that property.
  3. Shows that the property changed without expanding the full before/after values.
  4. Continues to update the resource normally based on those changes.

This is useful when working with properties that generate large or verbose diffs that clutter CLI output, while still allowing Pulumi to manage those properties normally.

Example usage ​

typescript
let res = new MyResource("res",
    { prop: "new-value" }, { hideDiffs: ["prop"] });

Property paths ​

Besides top-level property names, you can pass paths to nested properties to hide diffs for a specific part of the resource's properties. See property paths for examples of valid paths to nested properties of objects and arrays.

For example, to hide diffs for all weights in an AWS load balancer listener's target groups:

typescript
const listener = new aws.lb.Listener("listener", {
    // ... other configuration ...
    defaultActions: [{
        type: "forward",
        forward: {
            targetGroups: [
                { arn: blueGroup.arn, weight: 80 },
                { arn: greenGroup.arn, weight: 20 },
            ],
        },
    }],
}, { hideDiffs: ["defaultActions[*].forward.targetGroups[*].weight"] });

Content from the official Pulumi documentation (github.com/pulumi/docs).