Commit 1f32b2d3 authored by Chris Merrett's avatar Chris Merrett

Add lifecycle control

parent 5541d4c7
......@@ -193,6 +193,7 @@ resource "aws_autoscaling_group" "main" {
#############################################################################################################
resource "aws_autoscaling_policy" "scale_up" {
lifecycle { create_before_destroy = true }
name = "${var.name}-scale-up"
adjustment_type = "PercentChangeInCapacity"
scaling_adjustment = "${var.scale_up_scaling_adjustment}"
......@@ -201,6 +202,7 @@ resource "aws_autoscaling_policy" "scale_up" {
}
resource "aws_autoscaling_policy" "scale_down" {
lifecycle { create_before_destroy = true }
name = "${var.name}-scale-down"
adjustment_type = "PercentChangeInCapacity"
scaling_adjustment = "${var.scale_down_scaling_adjustment}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment