Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step scaling policies cannot be modified #3715

Closed
tilgovi opened this issue Mar 9, 2018 · 4 comments · Fixed by #3739
Closed

Step scaling policies cannot be modified #3715

tilgovi opened this issue Mar 9, 2018 · 4 comments · Fixed by #3739
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Milestone

Comments

@tilgovi
Copy link

tilgovi commented Mar 9, 2018

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.

@bflad bflad added bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service. labels Mar 9, 2018
@loivis
Copy link
Contributor

loivis commented Mar 11, 2018

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.

@bflad
Copy link
Contributor

bflad commented Mar 28, 2018

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

@bflad
Copy link
Contributor

bflad commented Mar 29, 2018

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.

@ghost
Copy link

ghost commented Apr 7, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Projects
None yet
3 participants