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

Updating configuration of a service where the status is currently 'critical' or 'warning' fails #82

Closed
paddie opened this issue May 5, 2018 · 3 comments

Comments

@paddie
Copy link
Contributor

paddie commented May 5, 2018

It seems the Pagerduty API fails with a 400 when attempting to update the attributes of a service with an active incident on it resulting in its status being either warning or critical. This might just be a bug in the PagerDuty API though.

Terraform Version

Terraform v0.11.6

Affected Resource(s)

  • resource "pagerduty_service"

Terraform Configuration Files

resource "pagerduty_service" "service" {
  name                    = "test"
  description             = "description"
  acknowledgement_timeout = "null"
  auto_resolve_timeout    = "null"
  escalation_policy       = "<ID>"
  alert_creation          = "create_alerts_and_incidents"

  incident_urgency_rule {
    type    = "constant"
    urgency = "high"
  }
}

Expected Behavior

Successful update of the configuration of the service

Actual Behavior

* module.business-systems.pagerduty_service.service: 1 error(s) occurred:

* pagerduty_service.service: PUT API call to https://api.pagerduty.com/services/PKS1O3C failed 400 Bad Request. Code: 2001, Errors: [Status must be in active or disabled.], Message: Invalid Input Provided

Steps to Reproduce

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

  1. terraform apply - create service
  2. change a single attribute, like the description of the service
  3. re-apply while that service is in a state where it has an active incident on it.
@paddie paddie changed the title Updating configuration of a service where the status is currently critical or warning fails Updating configuration of a service where the status is currently 'critical' or 'warning' fails May 5, 2018
@tmichelet
Copy link

tmichelet commented Sep 3, 2018

+1, I'd be interested in a workaround

Edit: I'm getting this error only when I have non resolved indicents for this specific service

@pdecat
Copy link
Contributor

pdecat commented Apr 16, 2019

I believe an HTTP PATCH operation would be more appropriate than a PUT to update an existing service's properties but I'm not sure it is supported as it is not documented: https://api-reference.pagerduty.com/#!/Services/put_services_id

@heimweh
Copy link
Collaborator

heimweh commented Aug 18, 2019

Hi @paddie, a fix for this was merged and released in 1.3.1.
I'll go ahead and close this for now but feel free to re-open at any time.

@heimweh heimweh closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants