-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
AWS ASG Scheduling Support #2367
Comments
This would be great for my team. We have a cluster that grows in size over night to do batch processing and would like to utilize this. There is an ongoing discussion on the google group including a workaround that uses the awscli in a local provisioner. https://groups.google.com/forum/#!topic/terraform-tool/EBWHxTtbbtk |
This is something like what I'm envisioning: resource "aws_autoscaling_group" "bar" {
availability_zones = ["us-east-1a"]
max_size = 15
min_size = 2
launch_configuration = "${aws_launch_configuration.bar.name}"
}
/* Scale up and down on a daily schedule */
resource "aws_autoscaling_scheduled_scaling" "reoccurring_scale_up" {
autoscaling_group_name = "${aws_autoscaling_group.bar.name}"
recurrence = "0 19 * * *"
desired_capacity = 8
}
resource "aws_autoscaling_scheduled_scaling" "reoccurring_scale_down" {
autoscaling_group_name = "${aws_autoscaling_group.bar.name}"
recurrence = "0 5 * * *"
desired_capacity = 2
}
/* Schedule exact times for scaling */
resource "aws_autoscaling_scheduled_scaling" "cyber_monday_boost_start" {
autoscaling_group_name = "${aws_autoscaling_group.bar.name}"
start_time = "2015-11-29T22:00:00Z"
desired_capacity = 15
}
resource "aws_autoscaling_scheduled_scaling" "cyber_monday_boost_end" {
autoscaling_group_name = "${aws_autoscaling_group.bar.name}"
start_time = "2015-12-01T01:00:00Z"
desired_capacity = 8
} The AWS documentation for this is at http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html |
I am using something very similar....I just created a wrapper around the node aws sdk...but my "inputs" look like {
"method": "putScheduledUpdateGroupAction",
"params": {
"AutoScalingGroupName": "{{autoScaleGroupName}}",
"ScheduledActionName": "{{ScheduledActionNamePrefix}}-goToSleep",
"MinSize": 0,
"DesiredCapacity": 0,
"MaxSize": 5,
"Recurrence": "0 0 * * *"
}
},
{
"method": "putScheduledUpdateGroupAction",
"params": {
"AutoScalingGroupName": "{{autoScaleGroupName}}",
"ScheduledActionName": "{{ScheduledActionNamePrefix}}-wakeUp",
"MinSize": 0,
"DesiredCapacity": 1,
"MaxSize": 5,
"Recurrence": "0 12 * * 1-5"
}
} |
👍 |
FYI, I am in the process of adding this #4256 |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Any plans to add support in the AWS provider for add/update a schedule for an AutoScalingGroup? Seems to be the only functionality that we consistently use that terraform doesn't support.
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/AutoScaling.html#putScheduledUpdateGroupAction-property
The text was updated successfully, but these errors were encountered: