https://pulumi.com logo
#aws
Title
# aws
f

fast-flower-40813

02/03/2021, 10:53 PM
Hey everyone, I'm looking to deploy a auoscaling group to aws and I'm trying to use the "DetachInstances" action available in the aws doc (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DetachInstances.html) but I didn't find anything in the pulumi doc, so i was wondering if it's possible to use it with pulumi 🤔
b

billowy-army-68599

02/03/2021, 10:56 PM
pulumi is designed to declare a desired state. you can't do "detach instances" in a declarative way, so its not available as a resource. What are you trying to ultimately achieve?
f

fast-flower-40813

02/03/2021, 11:04 PM
i see, let's say i have 8 nodes (or instances): node0,node2,...,node7, and they're all attached to an autoscaling group and let's say node2 is very important and can't go down no matter what (because i need it for my workload), so i would want to detach or protect this node
is it possible to do something like that using pulumi?
b

billowy-army-68599

02/03/2021, 11:21 PM
so, I don't think that's really possible with an ASG. The detach instances API essentially removes a node from the ASG completely and makes it become a standalone node. If your node2 is so important, don't put it in the ASG at any point, just provision a new EC2 instance using the instance resource: https://www.pulumi.com/docs/reference/pkg/aws/ec2/instance/
f

fast-flower-40813

02/03/2021, 11:44 PM
i see, thanks