pulumi-aws icon indicating copy to clipboard operation
pulumi-aws copied to clipboard

AWS Lightsail public port update incorrect

Open nanzeng opened this issue 2 years ago • 3 comments

What happened?

AWS lightsail public ports is updated incorrectly. Even though there is no change for the opened ports, pulumi up tries to modify existing ports, which results in all the IPv4 ports removed. If a new port is added, the result is that only that port is opened, but all the other previous opened ports are removed.

A workaround is to remove the public ports state and run pulumi up again to update the ports.

Steps to reproduce

  1. create a set of public ports, such as 22, 53, etc.
  2. run pulumi up to open these ports
  3. run pulumi up again without changing anything

Expected Behavior

ports 22, 53 are opened

Actual Behavior

ports 22, 53 are removed from the list

Versions used

No response

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

nanzeng avatar Apr 22 '22 10:04 nanzeng

Is this with aws or aws-native?

Frassle avatar Apr 22 '22 11:04 Frassle

It is from this module https://www.pulumi.com/registry/packages/aws/api-docs/lightsail/

nanzeng avatar Apr 22 '22 11:04 nanzeng

WIth the native api, update ports fails with the following error:

error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: xxxxxxx, api error ValidationException: Invalid patch update: readOnlyProperties [/properties/Networking/MonthlyTransfer/GbPerMonthAllocated] cannot be updated

nanzeng avatar Apr 22 '22 12:04 nanzeng