This message was deleted.
# general
s
This message was deleted.
w
It kind of seems like I'd need to make some custom resource that waits for the file to exist and then add an edge in the dependency graph between that and the droplet snapshot - but IDK if that's a good approach here
b
Hi @white-addition-55138 you may be able to write a dynamic provider to do this https://github.com/pulumi/examples/tree/master/aws-ts-ec2-provisioners
This would allow you to ssh into the machine after it has been created and check that it’s ready to create an image from
w
makes sense - thanks!
related - if I provision a droplet then take a snapshot.. I want to delete the droplet but keep the snapshot. Is this a good use of
protect
? I guess I'd want one of these two approaches. Does one seem much better to you or are they about the same?
Copy code
pulumi up #with protected snapshot
# save the snapshot id somewhere
pulumi down
pulumi stack rm --force
or
Copy code
pulumi up # no snapshot resouce
make-snapshot
pulumi down
pulumi stack rm
b
Personally I’d take the snapshot using the dynamic provider and don’t implement the deletion of the snapshot in the dynamic provider
w
ah interesting - that's a good idea! thanks again 🙂