Open lrnq opened 1 year ago
Hi @lrnq, sorry for the trouble and thank you for the detailed report. Until this is fixed, you might be able to use IgnoreChanges
on the throughput property to avoid the diff and the recreation of the resource.
Unfortunately, it looks like this issue hasn't seen any updates in a while. If you're still encountering this problem, could you leave a quick comment to let us know so we can prioritize it?
What happened?
If not set explicitly, the maximum throughput for a Serverless VPC Access connector appears to be determined by the maximum number of instances passed to
pulumi_gcp.vpcaccess.Connector
. In particular, it seems thatmax_throughput = 100 * max_instances
if themax_throughput
parameter is not specified. When runningpulumi up
for the first time (see steps to reproduce), this works as expected.However, the preview shown when running
pulumi up
once again suggests that the Serverless VPC Access connector should be replaced, and that the maximum throughput should be set to the default value (300). While the old connector does indeed get deleted and replaced with a new one, the parameters appear to exactly the same as before replacement, i.e.max_throughput = 100 * max_instances
is still satisfied after replacement. This pattern repeats itself for all future deployments.Expected Behavior
I expect
max_throughput = 100 * max_instances
ifmax_throughput
is not set explicitly.Steps to reproduce
I will assume that the GCP project does not have the Serverless VPC Access API enabled, hence you can run this example in a new project as is.
Firstly, after setting up a new stack run
pulumi up
with the the following__main__.py
file that (i) Enables the Serverless VPC Access API and (ii) Creates a Serverless VPC Access connector resource:Secondly, run
pulumi up
once again and the preview will show:Accepting this change doesn't actually change
maxThroughput
. This can be seen by accepting the change (in which the connector is actually replace, with what appears to be a connector with identical parameters), runningpulumi up
once again and observing the same preview message.Output of
pulumi about
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).