terraform-provider-pagerduty
terraform-provider-pagerduty copied to clipboard
Best practices on removing/adding persons for pagerduty_schedule objects
From time to time, when adding and removing folks for pagerduty_schedule
objects seems always causing the schedule disruptions (I wonder if there is any guidelines of using pagerduty_schedule
setup more correctly).
Personally, I think the issue is tied with how to properly use rotation_virtual_start
and start
fields for pagerduty_schedule
objects.
cc @stmcallister
I'd be interested in this too -- CC @lnxchk in case you know of any good best practices here. The current UX is so difficult; we end up either doing date math or we have to ignore the schedule resources after create.
@martinb3 I'll ask around. What are you seeing? Is it leaving timeslots with no coverage, or something else?
@lnxchk It's more of a UX thing than actual bugs.
From what I've seen, either with a significantly old start/rotation_virtual_start, or if even a schedule has been opened and saved without any changes in the UI -- basically any change to the schedule, it's very difficult to update Terraform config files and predict what the rotation changes will be. This is exacerbated by Terraform plan output where all the members of the schedule are opaque identifiers.
My experience has been that most teams at this point stop trying to figure out how to fix things in Terraform, and they'll go back just make their changes in the UI and then plan in Terraform, and just "fix" the Terraform files to undo any plan changes. And then the Terraform plan/apply ends up being a no-op.
It undermines IaC management of PagerDuty, when I've seen this place out.
I'm also interested in this best practice. Although we have an internal terraform module to manage on-call rotation, what I'm implementing to support removing/adding members are
- Add a new layer whose
rotation_virtual_start
andstart
are a future date-time - Modify an existing layer's
end
to disable it at the future date-time
[UPDATED] I got stuck to unset the end time of a layer. I created https://github.com/PagerDuty/terraform-provider-pagerduty/issues/451 to show the details.