https://pulumi.com logo
Title
r

refined-pilot-45584

12/29/2022, 1:43 PM
Hey All; Question. Can I with Pulumi - Create AND Destroy resources with Pulumi Up? For example.. Create a GKE Cluster, Create a Bastian VM, Run Commands on the VM and then Destroy the VM all as part of the Pulumi Up Command. Once the Pulumi Up has finished i would have expected my commands to have run on the VM but the VM not exist any more…
m

many-telephone-49025

12/29/2022, 3:24 PM
Hi Tim, no this is not possible. But there are different ways to solve your use case.
s

salmon-account-74572

12/29/2022, 4:24 PM
You could use the Automation API to 1. Stand up the bastion VM (first stack) 2. Stand up the GKE cluster (second stack) 3. Run some commands (third stack) 4. Tear down the bastion VM (first stack) You might need to adjust the order of operations, but you get the idea.
r

refined-pilot-45584

12/29/2022, 4:28 PM
Yeah this is something I am considering.. I’m trying to align myself on what’s the cleanest, most repeatable solution to get it all going/running with minimal effort for an end user.. really been playing around the last few days..
s

salmon-account-74572

12/29/2022, 4:48 PM
Understood! Let us know how we can help/assist!
r

refined-pilot-45584

12/29/2022, 4:49 PM
Go a couple of Golang syntax questions in the golang channel haha :face_with_peeking_eye: I’m really trying to wrap my head around types vs Pulumi types and the promise process for outputs
s

salmon-account-74572

12/29/2022, 4:54 PM
I’m no Golang expert, but let me go 👀
I responded to one of the questions, but the other one has me stumped. I’ll try to find a good internal resource and ping them next week (when most everyone is back in the office) to see if they can help.