barryw / terraform-aws-rds-scheduler

Terraform module for starting and stopping an RDS instance/cluster on a schedule
MIT License
2 stars 7 forks source link

Incorrect document in the readme #1

Open toddb opened 3 years ago

toddb commented 3 years ago

Thanks for the work.

The readme incorrect shows needing to use cron( ... ). Instead only the expression is required.

/* Start the RDS cluster at 6:50am EDT Monday - Friday */
up_schedule    = "cron(50 10 ? * MON-FRI *)"
/* Stop the RDS cluster at 9pm EDT every night */
down_schedule  = "cron(0 1 * * ? *)"

This errors

/* Start the RDS cluster at 6:50am EDT Monday - Friday */
up_schedule    = "50 10 ? * MON-FRI *"
/* Stop the RDS cluster at 9pm EDT every night */
down_schedule  = "0 1 * * ? *"

You may also want to add a link to the cron syntax: // cron syntax https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html

Errors

  Error: Creating CloudWatch Events Rule failed: ValidationException: Parameter ScheduleExpression is not valid.
    on .terraform/modules/base.rds-scheduler/main.tf line 147, in resource "aws_cloudwatch_event_rule" "up-schedule":
   147: resource "aws_cloudwatch_event_rule" "up-schedule" {

 Error: Creating CloudWatch Events Rule failed: ValidationException: Parameter ScheduleExpression is not valid.
    status code: 400, request id: 58e32f36-3d21-4e71-8eac-1b5e5ea5f91e [0m
    on .terraform/modules/base.rds-scheduler/main.tf line 160, in resource "aws_cloudwatch_event_rule" "down-schedule":
   160: resource "aws_cloudwatch_event_rule" "down-schedule" {
pcooke2002 commented 3 months ago

don't need