cancel
Showing results for 
Search instead for 
Did you mean: 
Marek_228998
Historic F5 Account

Problem this snippet solves:

Terraform template - AWS autoscaling

Code :

resource "aws_launch_configuration" "lc_conf" {
    name_prefix = "lc-example-"
    image_id = "ami-id"
    instance_type = "t2.micro"

    lifecycle {
      create_before_destroy = false
    }
}

resource "aws_autoscaling_group" "asg_group" {
    name = "asg_group"
    launch_configuration = "${aws_launch_configuration.lc_conf.name}"
    max_size = 2
    min_size = 0
    desired_capacity = 0
    vpc_zone_identifier = ["${aws_subnet.internal.id}"]
    availability_zones = ["${aws_subnet.management.availability_zone}"]
    wait_for_capacity_timeout = 0

    lifecycle {
      create_before_destroy = false
    }
}
Version history
Last update:
‎29-Sep-2016 01:07
Updated by:
Contributors