Hi Pulumi Community, Does anyone tried to create e...
# aws
b
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
@bored-vase-40478 how are you defining “healthy” ?
b
Hi @billowy-army-68599 I defined healthy when the status checks have passed.
b
which languages are you using?
b
I'm using python
b
so I can’t see where in the API those status checks get returned, which makes them hard to do anything with
q
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
pulumipus dancing music 1
b
b
Hey thanks!!!
q
@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
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
@billowy-army-68599 ec2.meta.client.describe_instance_status
b
Yes, thats the method that the aws cli has to retrive the status checks