Thread
#aws
    b

    bored-vase-40478

    2 months ago
    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

    2 months ago
    @bored-vase-40478 how are you defining “healthy” ?
    b

    bored-vase-40478

    2 months ago
    Hi @billowy-army-68599 I defined healthy when the status checks have passed.
    b

    billowy-army-68599

    2 months ago
    which languages are you using?
    b

    bored-vase-40478

    2 months ago
    I'm using python
    b

    billowy-army-68599

    2 months ago
    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

    2 months ago
    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
    b

    billowy-army-68599

    2 months ago
    b

    bored-vase-40478

    2 months ago
    Hey thanks!!!
    q

    quaint-match-50796

    2 months ago
    @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

    2 months ago
    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

    2 months ago
    @billowy-army-68599 ec2.meta.client.describe_instance_status
    b

    bored-vase-40478

    2 months ago
    Yes, thats the method that the aws cli has to retrive the status checks