Posts

Trick to Making Terraform Wait for AutoScaling Groups Instances to Ready

When using Terraform, it's not possible to know when the EC2 instances that are part of an AutoScaling Group are completely ready without using an ELB. And by completely ready, I mean we know the instances have finished running their cloud-init process (AKA userdata ).  See this Github issue for more details. But if we have access to the instances in the VPC, there's a workaround! To do this, you'll create your AutoScaling Group as usual: resource "aws_autoscaling_group" "cluster" { desired_capacity = " ${ var . ec2-instance-count } " launch_configuration = " ${ aws_launch_configuration . cluster . id } " max_size = " ${ var . ec2-instance-count } " min_size = 1 name = "cluster" vpc_zone_identifier = var . subnet-ids tag { key = "Name" value = "cluster"
Recent posts