Diagnosing Pulumi Resource Drift from ignoreChanges Misconfiguration
Learn how to spot and fix Pulumi resource drift caused by an incorrectly configured ignoreChanges option.
09 Oct 2025, 09:08 UTC

Recognizable condition
When you run pulumi preview or pulumi up, the CLI reports no changes for a resource, but you know the live cloud resource has been altered outside Pulumi (for example, tags edited in the AWS console). This mismatch is called drift.
Cause and diagnostic table
| Condition | Expected behavior | Observed |
|---|---|---|
| ignoreChanges correctly scoped | Pulumi shows a diff when the ignored property changes | No diff, CLI shows "ignoring changes" for the specified paths |
| ignoreChanges too broad or mis‑specified | Pulumi should detect the change | Pulumi reports no diff even though the resource changed |
Ordered checks
- Run a detailed preview – In the project directory, execute:
You need read access to the stack and, if the resource is AWS, valid AWS credentials. Look for lines that contain the text "ignoring changes" followed by a property path (e.g., "ignoring changes: tags"). If such lines appear, Pulumi is deliberately skipping those properties.pulumi preview --diff --stack - Inspect the resource definition – Open the TypeScript/JavaScript/Python file where the resource is declared and search for
ignoreChanges. Example snippet:
Verify that the array lists the exact property paths you intend to ignore. A common mistake is to include a top‑level resource name or an incorrect path, which causes Pulumi to ignore more than intended.new aws.s3.Bucket("my-bucket", {
acl: "private",
tags: {
Environment: "dev"
},
ignoreChanges: ["tags"]
}); - Compare live state with Pulumi state – Export the stack state and compare it with the current cloud resource:
Then, using the cloud provider’s CLI or console, retrieve the live resource (e.g.,pulumi stack export --stack > stack.jsonaws s3api get-bucket-tagging --bucket my-bucket) and check whether the values differ from those instack.json. A mismatch confirms drift. - Temporarily remove ignoreChanges – Comment out or delete the
ignoreChangesline, save the file, and run the preview again:
If the preview now shows a diff for the previously ignored property, the ignoreChanges setting was the cause of the drift. Note: this is a code change only; it does not modify the live resource until you runpulumi preview --diff --stackpulumi up. To roll back, simply restore the comment or re‑add the line and repeat the preview.
Fixes tied to findings
- Narrow the ignore paths – If the array contains overly broad entries (e.g.,
["*"]or a parent property that encompasses fields you want managed), replace them with the specific paths you truly want to ignore. Example: changeignoreChanges: ["tags"]toignoreChanges: ["tags.Owner"]if only the Owner tag should be left untouched. - Remove ignoreChanges when the property should be managed – If the resource drift indicates that the ignored property ought to reflect your configuration, delete the
ignoreChangesoption entirely. After saving, run:
Pulumi will propose an update to bring the live resource back into sync. Review the plan carefully; if the change would trigger a replacement (e.g., altering the bucket name), consider a more targeted approach or a maintenance window.pulumi up --stack
Escalation criteria
Proceed to escalation when:
- Drift persists after correcting
ignoreChangesand re‑runningpulumi up. - The resource continues to be altered by external automation (e.g., a separate CI pipeline, Terraform, or manual scripts) despite the Pulumi configuration being correct.
In these cases, review the external processes that modify the resource. Options include:
- Coordinating with the owning team to stop out‑of‑band changes.
- Using Pulumi ESC (Environment Secrets Controller) to centralize configuration and prevent drift.
- Adopting a stricter lifecycle policy (e.g.,
protect: true) or importing the resource into a separate stack dedicated to external management.
Limitations and practical verification
The ignoreChanges feature only affects properties explicitly listed in the array. Deeply nested changes that are not referenced by a matching path will still appear in diffs. Additionally, ignoring a property does not prevent Pulumi from planning a replacement if other properties force it.
To verify that a fix has resolved drift:
- Run
pulumi preview --diffand confirm that the previously ignored property now appears in the diff. - Apply the change with
pulumi up. - After the update succeeds, check the live resource (e.g., via AWS console or CLI) to see that the property matches the value defined in your Pulumi code.
Always test these steps in a non‑production stack or a separate preview branch before applying to production to avoid unintended replacements or downtime.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.