What's New
Add shutdown schedule support for automatic instance start/stop based on cron schedules. This feature enables cost optimization by stopping instances outside business hours.
New Features
- Automatic instance start/stop scheduling
- Configurable cron expressions for start and stop times
- Per-instance schedule control
- Fully backward compatible (disabled by default)
New Variables
enable_schedule(bool) - Enable/disable shutdown scheduleschedule_cron_start(string) - Cron expression for starting instancesschedule_cron_stop(string) - Cron expression for stopping instances
Usage Example
module "jumpbox" {
source = "git::https://github.com/DNXLabs/terraform-aws-stateful.git?ref=4.2.0"
name = "example-dev"
instance_count = 1
vpc_id = "vpc-xxxxx"
instances_subnet_ids = ["subnet-xxxxx"]
# Enable shutdown schedule
enable_schedule = true
schedule_cron_start = "0 20 * * MON-FRI" # Start at 8pm GMT Mon-Fri
schedule_cron_stop = "0 10 * * MON-FRI" # Stop at 10am GMT Mon-Fri
}