Open aschleck opened 2 years ago
Thanks for reporting the issue @aschleck. The compute API has a bunch of imperative operations defined for updates. In addition, it does have an update API which allows mutation of a small subset of resources. The heuristic used to generate this provider doesn't work well for resources with discrete imperative mutation APIs.
We have a couple of options here:
Thank you for taking a look at this so quickly!
I am not sure if you're interested in my opinion, you of course have a lot more knowledge about the right thing to do here for your project than I have, but maybe I can say: we're looking to use pulumi-google-native/pulumi-gcp to provision both dedicated developer machines as well as shared cluster resources. In the particular case of this knob I was trying to attach a public IP to an instance that's more like a developer machine, so I am very wary of having to replace it outright (pets, as opposed to cattle.) From this perspective, if this project choose to not implement custom mutation support that other projects do support I will probably give up on this project. It's just too risky that we'll do something that triggers a painful replacement/reinstall/re-setup for someone that could otherwise be avoided.
I totally respect whatever choice you make but I hope my additional context makes sense.
What happened?
I created an instance without a public IP, and later tried to give it an ephemeral public IP. The update failed to apply.
Steps to reproduce
Start with
then change
network_interfaces
to:Expected Behavior
In the web UI I can add and remove ephemeral IPs from an instance, so I think this is supposed to work. From snooping the GQL request in the network tab it looks like the UpdateInstance API call might have some special variables but I am not sure if that's actually making the difference.
Actual Behavior
Output of
pulumi about
Additional context
Thank you for working on this project!
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).