Is there a way to accomplish the following scenari...
# aws
b
Is there a way to accomplish the following scenario: • Create new version of launch template • Update ASG to use latest version of launch template • Force all old instances created w/ old launch template out to bring in the new instances w/ new launch template? Steps 1 and 2 are fine, but I am having trouble with step 3. There's "TerminationPolicy" but I think that only applies when the instances are told to spin down?
p
If you want the new instances out there now.. I'm pretty sure you'll just need to resize your ASG min/max/desired capacity sizes to launch some new servers which will use the new LT then drop the size back down to whatever you originally had it set to. The termination policy should delete the oldest instances first.
b
Right, but I don't think I can do that all in one run right? I would have to have two separate steps in the stack, but they would have to use the same resource name. And if you have two of the same resource name in the same stack, you get an error.
I'm trying to automate a release process to do this.
b
The api to do this is only exposed to cloud formation. If you want this feature, you’ll need to define a cloud formation stack with Pulumi. Alternatively, you can run this on your nodes: https://github.com/deitch/aws-asg-roller/blob/master/README.md
b
Interesting. Thanks @billowy-army-68599
@billowy-army-68599 or anyone, is there an equivalent to "Create_before_replace"?
Looks like if you set
DeleteBeforeReplace
explicitly to false, it creates the replacement before deleting the old.