When updating an AWS Autoscaling Group w/ an insta...
# general
c
When updating an AWS Autoscaling Group w/ an instanceRefresh eg
Copy code
instanceRefresh: {
        strategy: "Rolling",
        preferences: {
            minHealthyPercentage: 50,
        },
        triggers: ["tag"],
    },
is there a way to get Pulumi to wait until the refresh is complete?
b
yes. You inside an
apply
you can use the AWS SDK and a waiter: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-auto-scaling/globals.html#waitforgroupinservice I don’t have an example of this for this use case, but here’s an example which might help you with syntax: https://gist.github.com/lukehoban/fd0355ed5b82386bd89c0ffe2a3c916a
c
Great thanks, will give that a try
for future reference / examples ^ unfortunately since the ASG doesn't return the actual instance refresh id, it's not 100% accurate ( it'll wait on any refresh ).