I have created Maintenance window and task to start EC2 instance using terraform below is the code:
resource "aws_ssm_maintenance_window_task" "