Resource: aws_autoscaling_schedule

Provides an AutoScaling Schedule resource.

Example Usage

resource "aws_autoscaling_group" "foobar" {
  availability_zones        = ["us-west-2a"]
  name                      = "terraform-test-foobar5"
  max_size                  = 1
  min_size                  = 1
  health_check_grace_period = 300
  health_check_type         = "ELB"
  force_delete              = true
  termination_policies      = ["OldestInstance"]
}

resource "aws_autoscaling_schedule" "foobar" {
  scheduled_action_name  = "foobar"
  min_size               = 0
  max_size               = 1
  desired_capacity       = 0
  start_time             = "2016-12-11T18:00:00Z"
  end_time               = "2016-12-12T06:00:00Z"
  autoscaling_group_name = aws_autoscaling_group.foobar.name
}

Argument Reference

The following arguments are required:

The following arguments are optional:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import AutoScaling ScheduledAction using the auto-scaling-group-name and scheduled-action-name. For example:

import {
  to = aws_autoscaling_schedule.resource-name
  id = "auto-scaling-group-name/scheduled-action-name"
}

Using terraform import, import AutoScaling ScheduledAction using the auto-scaling-group-name and scheduled-action-name. For example:

% terraform import aws_autoscaling_schedule.resource-name auto-scaling-group-name/scheduled-action-name