Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No option to set "overflow" flag while creating/updating a schedule #21

Closed
99 opened this issue Aug 8, 2017 · 1 comment · Fixed by #23
Closed

No option to set "overflow" flag while creating/updating a schedule #21

99 opened this issue Aug 8, 2017 · 1 comment · Fixed by #23

Comments

@99
Copy link

99 commented Aug 8, 2017

Hi there,

Terraform Version

terraform_0.9.8

Affected Resource(s)

  • pagerduty_schedule

Terraform Configuration Files

 resource "pagerduty_schedule" "example1" {
  name      = "Daily Engineering Rotation"
  time_zone = "America/Los_Angeles"

  layer {
    name                         = "Shift1"
    start                        = "2017-06-26T15:00:00"
    rotation_virtual_start       = "2017-06-26T15:00:00"
    rotation_turn_length_seconds = 259200
    users                        = ["${pagerduty_user.user1.id}"]
}
}

Expected Behavior

Would expect schedule didn't change since it was set once
To fix this issue the flag overflow=true needs to be passed. according to the PD doc https://v2.developer.pagerduty.com/v2/page/api-reference#!/Schedules/put_schedules_id

Any on-call schedule entries that pass the date range bounds will be truncated at the bounds, unless the parameter overflow=true is passed. This parameter defaults to false. For instance, if your schedule is a rotation that changes daily at midnight UTC, and your date range is from 2011-06-01T10:00:00Z to 2011-06-01T14:00:00Z:

  • If you don't pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T10:00:00Z and end of 2011-06-01T14:00:00Z.
  • If you do pass the overflow=true parameter, you will get one schedule entry returned with a start of 2011-06-01T00:00:00Z and end of 2011-06-02T00:00:00Z.

Actual Behavior

Schedule changed after every terraform apply command gets run

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a schedule
  2. Have list of users in the order they should be on-call
  3. Run terraform apply
  4. Login into PD, see the schedule got shifted (updated)

slack_-_vevo
5 Run terraform apply again
contentservices1_-_pagerduty

Important Factoids

From PD documentation

@99
Copy link
Author

99 commented Dec 20, 2017

Hi Guys( @radeksimko @heimweh), is it possible to merge this fix to prod? , we are very much dependent on it and has been waiting for a couple of months. Thank you a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants