Simple EC2 Instance Scheduler
A Terraform module for placing Lambda function with AWS EventBridge rules for scheduling start \ stop instances
What is in progress?
- Terraform wrapper for Python
- Documentation
- IAM Role creation
- AWS EventBridge rule
- AWS EventBridge target
- Move all variables and add output to corresponding files
Usage
module "start_ec2_instances" {
source = "./aws-ec2-scheduler
name = "start"
schedule_time = "cron(0 8 ? * MON-FRI *)"
tag_key = "environment"
tag_value = "dev"
schedule_action = "start"
ec2_schedule = "true"
}
module "stop_ec2_instances" {
source = "./aws-ec2-scheduler
name = "stop"
schedule_time = "cron(0 8 ? * MON-FRI *)"
tag_key = "environment"
tag_value = "dev"
schedule_action = "stop"
ec2_schedule = "true"
}