Last active
August 20, 2018 23:54
-
-
Save endofcake/e58f0b6ad2813f3d8aaa655c03bdf799 to your computer and use it in GitHub Desktop.
Blue/Green ASG rollout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_autoscaling_group" "worker" { | |
# Force a redeployment when launch configuration changes. | |
# This will reset the desired capacity if it was changed due to | |
# autoscaling events. | |
name = "${aws_launch_configuration.worker.name}-asg" | |
min_size = 10 | |
desired_capacity = 15 | |
max_size = 25 | |
health_check_type = "EC2" | |
launch_configuration = "${aws_launch_configuration.worker.name}" | |
vpc_zone_identifier = ["${aws_subnet.public.*.id}"] | |
# Required to redeploy without an outage. | |
lifecycle { | |
create_before_destroy = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment