Terraform-provider-aws: Step scaling policies cannot be modified

Created on 9 Mar 2018  ยท  4Comments  ยท  Source: hashicorp/terraform-provider-aws

Terraform Version

Core - v0.11.3
AWS Provider - v1.10

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_autoscaling_policy

Terraform Configuration Files

resource "aws_autoscaling_policy" "ecs_general_purpose_scale_out" {
  name = "memory-reservation-high"

  autoscaling_group_name    = "${module.ecs_general_purpose.group}"
  estimated_instance_warmup = 60

  adjustment_type = "PercentChangeInCapacity"
  policy_type     = "StepScaling"

  metric_aggregation_type = "Maximum"

  step_adjustment {
    scaling_adjustment          = 100
    metric_interval_lower_bound = 0
  }
}

Expected Behavior

Modifying a field, such as the scaling adjustment, should modify the resource.

Actual Behavior

Terraform fails with a validation error.

Error: Error applying plan:

1 error(s) occurred:

* aws_autoscaling_policy.ecs_general_purpose_scale_out: 1 error(s) occurred:

* aws_autoscaling_policy.ecs_general_purpose_scale_out: StepScaling policy types cannot use scaling_adjustment!

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. Modify a field
  3. terraform apply

Important Factoids

There is error is nonsensical and contradicts the documentation and the behavior on create. Step scaling policies do have a scaling adjustment.

bug servicautoscaling

Most helpful comment

3739 has been merged into master and will release with v1.13.0 of the AWS provider, likely in about a week.

All 4 comments

The error is caused by zero value of arguments. But only nil is handled in current code. I've submitted a pr and hopefully it should fix issues for other arguments in the same scenario.

3739 has been merged into master and will release with v1.13.0 of the AWS provider, likely in about a week.

Ahead of schedule, this has been released in version 1.13.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cjeanneret picture cjeanneret  ยท  39Comments

hashibot picture hashibot  ยท  58Comments

hashibot picture hashibot  ยท  38Comments

darrenhaken picture darrenhaken  ยท  36Comments

hashibot picture hashibot  ยท  36Comments