https://pulumi.com logo
Title
b

bored-vase-40478

07/22/2022, 6:22 PM
Hi Pulumi Community, Does anyone tried to create ec2 instances and pause the resource deploying process until the ec2 instances have a healthy status? I would like to continue deploying resources until the ec2 instances have a healthy status. Not sure if the right way is to configure Pulumi custom timeouts
opts=ResourceOptions(custom_timeouts=CustomTimeouts(create='30m'))
b

billowy-army-68599

07/22/2022, 6:45 PM
@bored-vase-40478 how are you defining “healthy” ?
b

bored-vase-40478

07/22/2022, 6:52 PM
Hi @billowy-army-68599 I defined healthy when the status checks have passed.
b

billowy-army-68599

07/22/2022, 6:53 PM
which languages are you using?
b

bored-vase-40478

07/22/2022, 6:53 PM
I'm using python
b

billowy-army-68599

07/22/2022, 6:59 PM
so I can’t see where in the API those status checks get returned, which makes them hard to do anything with
q

quaint-match-50796

07/22/2022, 7:14 PM
On GitHub there is a repo about something similar. I need to find it again. But the main idea would be using boto to do this check. @bored-vase-40478 Look at boto3: ec2.meta.client.describe_instance_status
😛ulumipus-dancing-music: 1
b

billowy-army-68599

07/22/2022, 7:16 PM
b

bored-vase-40478

07/22/2022, 7:17 PM
Hey thanks!!!
q

quaint-match-50796

07/22/2022, 7:18 PM
@billowy-army-68599 It was in your repo I got my first idea to handle this. Thank you! I didn't remember it was yours 😅
b

billowy-army-68599

07/22/2022, 7:18 PM
the reason I’m apprehensive is because i’m not sure where in the ec2 api the status checks are
if you can find them, you can do the same
q

quaint-match-50796

07/22/2022, 7:19 PM
@billowy-army-68599 ec2.meta.client.describe_instance_status
b

bored-vase-40478

07/22/2022, 7:20 PM
Yes, thats the method that the aws cli has to retrive the status checks