Hi, Why if I set `parent=parent_id` to a resource ...
# getting-started
Hi, Why if I set
to a resource Pulumi wants to delete this resource? Is that expected behaviour?
@rough-oyster-77458 because you're changing the URN. you can use to point to the old resource urn and stop the deletion behaviour:
once the urn has been updated pulumi knows the two resources are related, and reconciles them
thanks a lot. After your advice, I fixed the issue by adding
. It would be great to add this to
ResourceOptions documentation page. Because this behaviour looks pretty confusing for a new user.
It is there. 3rd last paragraph:
aliases: Aliases applied to a parent are applied to all child resources, so that changing the type of a parent resource correctly changes the qualified type of a child resource, and changing the name of a parent resource correctly changes the name prefix of child resources.
Wording is reasonably indecipherable though. Could be simplified.