Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Terraform AWS – ScheduleExpression is not valid

I am trying to create a resource

resource "aws_cloudwatch_event_rule" "foo" {
  ..
  schedule_expression = "cron(*/5 * * * * *)"
}

And I want it to run every 5 minutes. Terraform says this expression is not valid:

ValidationException: Parameter ScheduleExpression is not valid.

What am I doing wrong?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Note that I don’t want to use rate(5 minutes) because I want it to run at minutes which are multiplies of 5 (00, 05, 10, 15, 20, […], 55).

>Solution :

It should be:

cron(*/5 * ? * * *)

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading