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? Note that I don’t want to use… Read More Terraform AWS – ScheduleExpression is not valid

Is there a way to execute an EC2 Action with a CloudWatch Alarm in Terraform?

Following this guide: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html I have alarms created to alert me on StatusCheckFailed_System events. It is possible through the UI to set up EC2 Actions to do something with the instance once it is in an alarm state. In this case, I’d like to reboot the system if I get an alarm on StatusCheckFailed_System. Is… Read More Is there a way to execute an EC2 Action with a CloudWatch Alarm in Terraform?