Perhaps this is a bit esoteric, but I'm wondering if there is anyway in Pulumi to have the notion of "create resource A before creating resource C, but once C is created, delete A". My specific use-case is around configuration of a machine, where after bare-metal installation, can be default be written to by anyone (it's a publc IP). Thus my solution is to:
1. Have a Pulumi resource for my cloud provider that creates a firewall to limits it to traffic from our companies internal IP block (A)
2. Have a Pulumi resource that depends on A that does an installation of a fresh OS from an image (B)
3. Have a Pulumi resource that depends on B apply a configuration to the OS (C). This now locks down the resource.
4. Now that C is done, delete the firewall A (since we not have a locked down configuration)
I could does this manually by doing
pulumi up
multiple times with different configurations, but it seems nice to be able to do all in one go. 🙂