Skip to content

Commit

Permalink
Adding support for start_day_of_week (schedule restriction)
Browse files Browse the repository at this point in the history
  • Loading branch information
heimweh committed Dec 14, 2016
1 parent 572796d commit 5dcdbc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/pagerduty/resource_pagerduty_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func resourcePagerDutySchedule() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"start_day_of_week": {
Type: schema.TypeInt,
Optional: true,
},
"duration_seconds": {
Type: schema.TypeInt,
Required: true,
Expand Down
1 change: 1 addition & 0 deletions builtin/providers/pagerduty/structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func expandScheduleLayers(list []interface{}) []pagerduty.ScheduleLayer {
pagerduty.Restriction{
Type: restriction["type"].(string),
StartTimeOfDay: restriction["start_time_of_day"].(string),
StartDayOfWeek: restriction["start_day_of_week"].(int),
DurationSeconds: uint(restriction["duration_seconds"].(int)),
},
)
Expand Down

0 comments on commit 5dcdbc1

Please sign in to comment.