pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
94 stars 17 forks source link

Failed to update Cloudwatch Canary #941

Closed schnipseljagd closed 10 months ago

schnipseljagd commented 1 year ago

What happened?

When trying to update the code.script parameter value we are running into:

error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: xxx, api error ValidationException: Invalid patch update: readOnlyProperties [/properties/Code/SourceLocationArn] cannot be updated

Expected Behavior

This should update the canary Lambda code.

Steps to reproduce

See: https://github.com/pulumi/pulumi-aws-native/issues/702#issuecomment-1523695286 Deploy it and change some code.

Output of pulumi about

pulumi about CLI
Version 3.72.2 Go Version go1.20.5 Go Compiler gc

Plugins NAME VERSION nodejs unknown

Host
OS ubuntu Version 22.04 Arch x86_64

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).

mikhailshilkov commented 1 year ago

Thank you @schnipseljagd for reporting this issue.

I see that indeed this property is marked as read-only in the AWS Cloud Formation spec: https://github.com/pulumi/pulumi-aws-native/blob/3c82b9c07b59511f5d2847b5c3f6e8bb380141c7/aws-cloudformation-schema/aws-synthetics-canary.json#L276

Which means that you can't edit it. The Pulumi CLI should have proposed a replacement for your resource in this case, but it sounds like we did not (so there is a bug somewhere). Do you agree with this conclusion?

schnipseljagd commented 1 year ago

Thank you @schnipseljagd for reporting this issue.

I see that indeed this property is marked as read-only in the AWS Cloud Formation spec:

https://github.com/pulumi/pulumi-aws-native/blob/3c82b9c07b59511f5d2847b5c3f6e8bb380141c7/aws-cloudformation-schema/aws-synthetics-canary.json#L276

Which means that you can't edit it. The Pulumi CLI should have proposed a replacement for your resource in this case, but it sounds like we did not (so there is a bug somewhere). Do you agree with this conclusion?

Makes sense to me yes.

mjeffryes commented 10 months ago

should be fixed by https://github.com/pulumi/pulumi-aws-native/pull/1053