From 40fed221d1897606550f74f05416e376669e69ac Mon Sep 17 00:00:00 2001 From: Dominik Rastawicki Date: Fri, 10 Sep 2021 14:40:11 +0800 Subject: [PATCH] Validate start time of week --- pagerduty/resource_pagerduty_schedule.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pagerduty/resource_pagerduty_schedule.go b/pagerduty/resource_pagerduty_schedule.go index 33fff149a..aa4cb533b 100644 --- a/pagerduty/resource_pagerduty_schedule.go +++ b/pagerduty/resource_pagerduty_schedule.go @@ -2,6 +2,7 @@ package pagerduty import ( "fmt" + "github.com/hashicorp/terraform-plugin-sdk/helper/validation" "log" "time" @@ -110,6 +111,7 @@ func resourcePagerDutySchedule() *schema.Resource { "start_day_of_week": { Type: schema.TypeInt, Optional: true, + ValidateFunc: validation.IntBetween(1, 7), }, "duration_seconds": {