Closed doryer closed 2 years ago
For anyone else landing here. This helped me: https://community.pagerduty.com/forum/t/severity-based-urgency-results-in-error-2001-active-urgency-must-be-in-high-low-or-severity-based/3919/2
That link is dead now. Here is a Wayback Machine copy: https://web.archive.org/web/20220818042150/https://community.pagerduty.com/forum/t/severity-based-urgency-results-in-error-2001-active-urgency-must-be-in-high-low-or-severity-based/3919
The gist of it is, don't include the support_hours
block if the urgency rule is not based on support hours.
Terraform Version
Terraform v1.1.6
Affected Resource(s)
pagerduty_service
Terraform Configuration Files
resource "pagerduty_service" "central_pager_weekend" { name = "${var.team_name} weekend" acknowledgement_timeout = 300 auto_resolve_timeout = "null" escalation_policy = pagerduty_escalation_policy.during_weekend_central_pager_escalation_policy.id alert_creation = "create_alerts_and_incidents"
incident_urgency_rule { type = "constant" urgency = "high" }
support_hours { type = "fixed_time_per_day" time_zone = var.work_time.timezone start_time = var.work_time.start_time end_time = var.work_time.end_time days_of_week = var.work_time.working_days } }
Panic Output
Error: POST API call to https://api.pagerduty.com/services failed 400 Bad Request. Code: 2001, Errors: [Active urgency must be in high, low, or severity_based.], Message: Invalid Input Provided
Expected Behavior
Create a new pagerduty service with high urgency alerts.
Actual Behavior
It seems like I get an ERROR on my input to incdient_urgency_rule, checked in API docs and terraform registry docs for the resource, and it looks all fine. this configuration seems to work with support hours configured, but not with constant urgency
Steps to Reproduce
terraform apply