mirror of https://github.com/pulumi/pulumi.git
dc6f275f03
When performing a `--target`ed operation, it is possible that the new program introduces new resources that are not targeted. In such cases, we can't emit `CreateStep`s (since that would not respect the `--target`s), but we need to track the creations so that e.g. later resources that will come to depend on these would-be resources can be handled appropriately. The step generator maintains a list of so-called "skipped creates" to this end. Unfortunately, when later traversing the list of skipped creates to see if any resources depend on them, "depend on" does not take into account property dependencies and deleted-with relationships. This results in snapshot integrity errors as we end up writing the broken dependencies to the state. This commit rewrites the code to use the new `GetAllDependencies()` method on `resource.State` to take account of the other possible relationships, adding lifecycle tests for these new cases and cleaning up the existing tests to be more specific about the errors they expect. |
||
---|---|---|
.. | ||
-0-0 | ||
0 | ||
1 |