# Terraform aws\_appautoscaling\_policy not picking up correct step\_adjustment bound values

**URL:** <https://discuss.hashicorp.com/t/terraform-aws-appautoscaling-policy-not-picking-up-correct-step-adjustment-bound-values/5747>\
**Category:** Terraform\
**Created:** [February 6, 2020, 10:31pm UTC](https://discuss.hashicorp.com/t/terraform-aws-appautoscaling-policy-not-picking-up-correct-step-adjustment-bound-values/5747 "2020-02-06T22:31:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpenna](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mpenna/32/4488_2.png) [@mpenna](https://discuss.hashicorp.com/u/mpenna)\
**Post date:** [February 6, 2020, 10:31pm UTC](https://discuss.hashicorp.com/t/terraform-aws-appautoscaling-policy-not-picking-up-correct-step-adjustment-bound-values/5747/1 "2020-02-06T22:31:08Z")

</div>

Hi there,

I have this aws\_appautoscaling\_policy resource that keeps fetching the wrong values for the upper and lower bounds of its various step\_adjustment settings. At some point the configuration state and the corresponding resource have diverged and now everytime I do a plan, Terraform reports back that the configured values (copied from the actual resource) are different form those currently fetched during the planning operation and therefore an update must be performed.

This is the configuration:

```auto
resource "aws_appautoscaling_policy" "api_up" {
  name = "${local.api_name}-scale-up-pol"
  service_namespace = "ecs"
  resource_id = "service/${aws_ecs_cluster.default.name}/${aws_ecs_service.api.name}"
  scalable_dimension = "ecs:service:DesiredCount"

  step_scaling_policy_configuration {
    adjustment_type = "ChangeInCapacity"
    cooldown = 60
    metric_aggregation_type = "Average"

    step_adjustment {
      metric_interval_lower_bound = 35.0
      metric_interval_upper_bound = 55.0
      scaling_adjustment = 6
    }

    step_adjustment {
      metric_interval_lower_bound = 55.0
      metric_interval_upper_bound = 75.0
      scaling_adjustment = 12
    }

    step_adjustment {
      metric_interval_lower_bound = 75.0
      scaling_adjustment = 18
    }
  }

  depends_on = [aws_appautoscaling_target.api]
}
```

And this is a screen grab of the policy currently attached to an ECS Service:

 ![SNAG-2020-02-06-19-23-07](https://global.discourse-cdn.com/hashicorp/original/2X/3/3b99bdf50e36cd530e85ccb17795be9e38bcb2c1.png)
