Open MitchellGerdisch opened 1 month ago
FYI, This also happens with Python.
Thanks for reporting @MitchellGerdisch, I've reproduced this upstream and raised an issue: https://github.com/PagerDuty/terraform-provider-pagerduty/issues/934
For anyone affected, the workaround as @MitchellGerdisch noted is to rearrange the property inputs to be alphabetical.
@VenelinMartinov Is the upstream bug correct? It looks like the template, not the actual issue, in the body of the issue, unless I’m misunderstanding something.
@joeduffy thanks for pointing it out. I had left the template questions along with my repro steps, making it a bit hard to read. I've editted the upstream issue to leave only the relevant bits now.
Describe what happened
When running
pulumi up
orpreview
for a program that includes a pagerduty WebhookSubscription resource with a list of events specified (https://www.pulumi.com/registry/packages/pagerduty/api-docs/webhooksubscription/#events_nodejs) even though nothing has changed, pulumi shows a diff and wants to update the resource due to the events list property being reordered by the provider.This results in a diff like this. Although a work-around may be to sort the events in alphabetical order to match what the provider or API returns, it seems like this should not be necessary and it should just work.
Sample program
To reproduce, run
pulumi up
twice or more times for the following program. You will see that the second and later updates always show a diff because theacknowledged
event is out of alphabetical order.Log output
No response
Affected Resource(s)
No response
Output of
pulumi about
CLI
Version 3.134.1 Go Version go1.23.1 Go Compiler gc
Plugins KIND NAME VERSION language nodejs unknown resource pagerduty 4.14.6
Host
OS darwin Version 13.6.9 Arch x86_64
This project is written in nodejs: executable='/Users/mitch/.nvm/versions/node/v20.10.0/bin/node' version='v20.10.0'
Found no resources associated with dev
Found no pending operations associated with dev
Backend
Name pulumi.com
Dependencies: NAME VERSION @pulumi/pagerduty 4.14.6 @pulumi/pulumi 3.134.1 @types/node 18.19.54 typescript 5.6.2
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).