It looks like there is currently no support for AWS Redshift scheduled actions such as pause and resume (those actions and schedules are different to those of snapshots) — at least I could not find any references to them in docs nor in issue tracker here.
resource "aws_redschift_scheduled_action" "this" {
name = "nightly-pause"
description = "Pause redshift cluster for the night" # optional
active = true # optional
# possibly use some more user-friendly time format here
start_time = "2020-04-10T00:00:00+00:00" # optional
end_time = "2020-05-11T00:00:00+00:00" # optional
schedule = "cron(00 21 * * ? *)" # time is UTC
iam_role = aws_iam_role.scheduler.arn
target_action {
action = "PauseCluster"
cluster_identifier = aws_redshift_cluster.this.id
}
}
https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html
This could _almost_ be merged already - https://github.com/terraform-providers/terraform-provider-aws/pull/13474 - seems like done but abandoned.
Most helpful comment
This could _almost_ be merged already - https://github.com/terraform-providers/terraform-provider-aws/pull/13474 - seems like done but abandoned.