FEATURES PRICING ABOUT DOCS LOGIN

aws_autoscaling_policy

Provides an AutoScaling Scaling Policy resource.

~> NOTE: You may want to omit desired_capacity attribute from attached aws_autoscaling_group when using autoscaling policies. It’s good practice to pick either manual or dynamic (policy-based) scaling.

Example Usage

resource "aws_autoscaling_policy" "bat" {
  name = "foobar3-terraform-test"
  scaling_adjustment = 4
  adjustment_type = "ChangeInCapacity"
  cooldown = 300
  autoscaling_group_name = "${aws_autoscaling_group.bar.name}"
}

resource "aws_autoscaling_group" "bar" {
  availability_zones = ["us-east-1a"]
  name = "foobar3-terraform-test"
  max_size = 5
  min_size = 2
  health_check_grace_period = 300
  health_check_type = "ELB"
  force_delete = true
  launch_configuration = "${aws_launch_configuration.foo.name}"
}

Argument Reference

The following arguments are supported:

The following arguments are only available to “SimpleScaling” type policies:

The following arguments are only available to “StepScaling” type policies:

step_adjustment {
  scaling_adjustment = -1
  metric_interval_lower_bound = 1.0
  metric_interval_upper_bound = 2.0
}
step_adjustment {
  scaling_adjustment = 1
  metric_interval_lower_bound = 2.0
  metric_interval_upper_bound = 3.0
}

The following fields are available in step adjustments:

The following arguments are supported for backwards compatibility but should not be used:

Attribute Reference


See the source of this document at Terraform.io

REQUEST A DEMO