great-sunset-355
01/13/2025, 10:08 PM{ val?: number }
create:
const s = { val: 1 }
now I no want val
to be undefined
because SentryProvider has an internal functionality depends on the undefined
value.
update:
const s = { val: undefined }
the problem is that pulumi won’t pick this change up and does nothing, leaving the original value intact.
What can I do in this case?little-cartoon-10569
01/13/2025, 10:27 PMsentry.Provider
? I can't see an Input on sentry.Provider that takes an optional value, so I can't check the code. Is it a provider or a cloud resource that's showing this behaviour?great-sunset-355
01/13/2025, 10:58 PMenvironment
.
official sentry API says it is nullable (or optinal)
So I checked the terraform provider and found it optional.
but optional to pulumi means undefined
not null
.
So I am digging in the terraform provider of the version 11, that’s what pulumi uses
https://registry.terraform.io/providers/jianyuan/sentry/0.11.2/docs/resources/issue_alert#environment-6
and it is optional even there.
It is still optional in even in the latest version
And the new version 14.x
is based on open API spec
https://registry.terraform.io/providers/jianyuan/sentry/latest/docs/resources/issue_alert#environment-2
Which makes me wonder if the terraform provider works as expected and it is messed up on pulumi side or not.great-sunset-355
01/13/2025, 11:00 PMnull
value should call “select All” https://docs.sentry.io/api/alerts/create-an-issue-alert-rule-for-a-project/great-sunset-355
01/13/2025, 11:00 PMundefined
value in pulumi provider won’t trigger the state changelittle-cartoon-10569
01/13/2025, 11:03 PMgreat-sunset-355
01/13/2025, 11:09 PMpulumi.Input<string> | undefined
not null
great-sunset-355
01/13/2025, 11:11 PM400 map[environment:[This environment has not been created.]]
this whole API is cursed and bugged IMOgreat-sunset-355
01/13/2025, 11:17 PMnull
type or `""`(empty string) causes the update! yet pulumi state shows inputs: ""
but `outputs: “old value that should not be there”little-cartoon-10569
01/13/2025, 11:17 PMenvironment
value and send the alert no matter what it is. Can you use the filter
property and set it to something that always matches everything? Or something that always matches what you want.little-cartoon-10569
01/13/2025, 11:21 PMlittle-cartoon-10569
01/13/2025, 11:23 PMgreat-sunset-355
01/13/2025, 11:23 PMreplaceOnChanges
to recreate the whole resourcelittle-cartoon-10569
01/13/2025, 11:23 PMgreat-sunset-355
01/13/2025, 11:25 PMnull as any
to avoid type checking. IMO there’s somewhere a nullcheck for nullish values because the same behaviour can be expected with null, undefined, ""
- no changes to statelittle-cartoon-10569
01/13/2025, 11:27 PMnull as any
would work the same way as going to JS, and it might work. However I'd say the other solution would be much simpler to implementgreat-sunset-355
01/13/2025, 11:31 PMreplaceOnChanges:["conditions"]
and environment: undefined
and this has caused the replacement and expected behaviour.great-sunset-355
01/13/2025, 11:52 PMnull
but that unselected the thing. Not selected All …