Error: Error putting scheduled action: ValidationException: Invalid schedule expression. Details: Invalid CRON expression: error at position 0, details: Invalid Month value: 'MON'
on .terraform/modules/XXX/microservice/main.tf line 471, in resource "aws_appautoscaling_scheduled_action" "scale_down_for_night":
471: resource "aws_appautoscaling_scheduled_action" "scale_down_for_night" {
Expected Behavior
Terraform should tell me that the value for Day-of-month in the cron expression must be a ? if the value of Day-of-week is set as in my example, which is explained in the AWS documentation (correct expression is cron(0 16 ? * MON-FRI *)).
Actual Behavior
The Terraform error indicates that MON ist an invalid value for Month, which is misleading.
Steps to Reproduce
Try to create a aws_appautoscaling_scheduled_action with a cron expression as shown in the example above.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform should tell me that the value for
Day-of-month
in the cron expression must be a?
if the value ofDay-of-week
is set as in my example, which is explained in the AWS documentation (correct expression iscron(0 16 ? * MON-FRI *)
).Actual Behavior
The Terraform error indicates that
MON
ist an invalid value forMonth
, which is misleading.Steps to Reproduce
Try to create a
aws_appautoscaling_scheduled_action
with a cron expression as shown in the example above.