-
Notifications
You must be signed in to change notification settings - Fork 213
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
Schedule#start challenge #330
Comments
Actually, on a second view I think it purely relates to UTC Daytime Adjustment 🧐 |
Hey Dominik! Thanks for the question and feedback. It looks like you're defining start times that are in the past. The PagerDuty API interprets start times in the past as the current of the call. One way I've heard of folks getting around seeing this diff you've described is by using the For example, you would use it inside the
|
@stmcallister Answer confirmed. Official syntax is: resource "pagerduty_schedule" "x" {
lifecycle {
ignore_changes = [ layer["start"] ]
}
...
layer {
...
}
} |
If you are using dynamic blocks, then resource "pagerduty_schedule" "x" {
for_each = var.schedules
lifecycle {
ignore_changes = [ layer[0].start, layer[1].start, layer[2].start, layer[3].start, layer[4].start ]
}
...
dynamic "layer" {
for_each = lookup(each.value, "layers", {})
content {
...
}
}
} The downside to this is that you won't be able to schedule when layout changes take effect after the layer has been created. I haven't figured out a way around that problem. |
@stmcallister -- The workaround suggested here is problematic because my users can no longer schedule when they want layer changes to take effect. Do you have any ideas how to get around this problem? |
@stmcallister I can confirm what @jashugan says. Since I added the |
I just observe that Terraform 1.0.0 handles it gracefully in fact ignoring it as
Nice 🚀 |
Is there a solution identified for this besides the If there are any properties in API call that are ignored and overridden by PagerDuty products, then forget about whether those are |
Looks like we forgot to tag this issue when we made the fix for this. You should be able to fix this if you're using v1.9.8 or later of the PagerDuty provider. I've connected with @sgujavarthy offline, so I'm going to close this issue. Please repost if you continue to have troubles. |
Summary
I challenge the [schedule#start] (https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/schedule#start) (maybe one can also say I do not understand how it works).
How can a property be
required
but then immediately beoverridden
by PD API?I can not see through 100%. Also, why should one really literally care about the start, the
rotation_virtual_start
matters.Current behaviour
start
behaves arbitrarily. To me it even seems that if someone creates an override for the schedule under inspection, the start date changes.Wanted behaviour
start
is not required and notrequired
start
the provider spawns just the current datetimestart
does not get reported by TF as changed (omitted)Change my mind ☕️ 🤗
Versions
Backing evidence
I updated the state today at 13:50.
I run
plan
4 minutes later without touching ANY code and this is the result:Why? 😢
Am I doing it wrong?
The text was updated successfully, but these errors were encountered: