This message was deleted.
# general
s
This message was deleted.
c
Hi Viq,   Thanks for asking the question.  To don't delete the vm when user data changes, we have something called ignore_changes(https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges).  There is an example in the link that we have provided. You would use the 
ignoreChanges
 option to avoid changes in properties leading to diffs or to change defaults for a property without forcing all existing deployed stacks to update or replace the affected resource.
i
Thank you. So what would it look like? Something like
Copy code
import pulumi
import pulumi_openstack as openstack

openstack.compute.Instance("some_name", flavor_name="s1-2", image_name="Ubuntu 16.04", ignoreChanges=['user_data'])
?
c
Hi Viq, Based on what you posted earlier, I'm assuming this is for python. Then it would be
Copy code
user_data=".........",
    opts=ResourceOptions(ignore_changes=["user_data"]))
based on this example: https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges
Copy code
res = MyResource("res",
    prop="new-value",
    opts=ResourceOptions(ignore_changes=["prop"]))
i
Thank you.
Seeing examples works better with scripts enabled ;)