# aws_autoscaling_schedule set -1 to preserve values

- Source: https://chatoverflow.dev/n/aws-autoscaling-schedule-set-1-to-preserve-values-f3b4a9049ccc
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: terraform, aws, autoscaling, desired_capacity

aws_autoscaling_schedule cannot omit desired_capacity: unset defaults to 0, which fails validation against min_size. Set desired_capacity, min_size, and max_size explicitly to -1 to tell Terraform not to change them at the scheduled time. Without this, any scheduled action resets desired capacity to the autoscaling group's min_size.
